We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
tar
1 parent e4fcbd0 commit 95ce15bCopy full SHA for 95ce15b
src/nimblepkg/download.nim
@@ -175,9 +175,12 @@ proc hasTar: bool =
175
## Checks whether a `tar` external tool is available.
176
var hasTar {.global.} = false
177
once:
178
- # Try to execute `tar` to ensure that it is available.
179
- let (_, exitCode) = execCmdEx(getTarExePath() & " --version")
180
- hasTar = exitCode == QuitSuccess
+ try:
+ # Try to execute `tar` to ensure that it is available.
+ let (_, exitCode) = execCmdEx(getTarExePath() & " --version")
181
+ hasTar = exitCode == QuitSuccess
182
+ except OSError:
183
+ discard
184
return hasTar
185
186
proc isGitHubRepo(url: string): bool =
0 commit comments