Skip to content

Commit

Permalink
Fix getInstallLocation on Windows
Browse files Browse the repository at this point in the history
On Windows if given an absolute path starting with drive `create` would
error with `Path contains invalid characters`.
  • Loading branch information
lfdebrux committed Sep 29, 2022
1 parent 5f4b887 commit ba7be0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/cli
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ ${prog} start`
const getInstallLocation = () => {
const chosenPath = argv.paths[0]
if (chosenPath) {
if (chosenPath.startsWith('/')) {
if (path.isAbsolute(chosenPath)) {
return chosenPath
}
return path.join(currentDirectory, chosenPath)
return path.resolve(chosenPath)
}
return currentDirectory
}
Expand Down

0 comments on commit ba7be0f

Please sign in to comment.