Skip to content
Snippets Groups Projects
Verified Commit 63c70ee7 authored by Julian Ospald's avatar Julian Ospald :tea:
Browse files

Fix changelog subcommand on darwin

parent 2e0bbca2
No related branches found
No related tags found
No related merge requests found
Pipeline #22212 passed
...@@ -283,7 +283,11 @@ changelog' AppState {..} (_, ListResult {..}) = do ...@@ -283,7 +283,11 @@ changelog' AppState {..} (_, ListResult {..}) = do
Nothing -> pure $ Left Nothing -> pure $ Left
[i|Could not find ChangeLog for #{lTool}, version #{prettyVer lVer}|] [i|Could not find ChangeLog for #{lTool}, version #{prettyVer lVer}|]
Just uri -> do Just uri -> do
exec "xdg-open" True [serializeURIRef' uri] Nothing Nothing >>= \case let cmd = case _rPlatform pfreq of
Darwin -> "open"
Linux _ -> "xdg-open"
FreeBSD -> "xdg-open"
exec cmd True [serializeURIRef' uri] Nothing Nothing >>= \case
Right _ -> pure $ Right () Right _ -> pure $ Right ()
Left e -> pure $ Left [i|#{e}|] Left e -> pure $ Left [i|#{e}|]
......
...@@ -1308,9 +1308,14 @@ Make sure to clean up #{tmpdir} afterwards.|]) ...@@ -1308,9 +1308,14 @@ Make sure to clean up #{tmpdir} afterwards.|])
pure ExitSuccess pure ExitSuccess
Just uri -> do Just uri -> do
let uri' = T.unpack . decUTF8Safe . serializeURIRef' $ uri let uri' = T.unpack . decUTF8Safe . serializeURIRef' $ uri
cmd = case _rPlatform pfreq of
Darwin -> "open"
Linux _ -> "xdg-open"
FreeBSD -> "xdg-open"
if clOpen if clOpen
then then
exec "xdg-open" exec cmd
True True
[serializeURIRef' uri] [serializeURIRef' uri]
Nothing Nothing
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment