Skip to content

Commit 310887b

Browse files
committed
fix: don't fail if Python3 symlink already exists
Signed-off-by: David Sanders <dsanders11@ucsbalum.com>
1 parent b08ba6b commit 310887b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/build.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,11 @@ async function build (gyp, argv) {
204204
} catch (err) {
205205
if (err.code !== 'ENOENT') throw err
206206
}
207-
await fs.symlink(python, symlinkDestination)
207+
try {
208+
await fs.symlink(python, symlinkDestination)
209+
} catch (err) {
210+
if (err.code !== 'EEXIST') throw err
211+
}
208212
log.verbose('bin symlinks', `created symlink to "${python}" in "${buildBinsDir}" and added to PATH`)
209213
}
210214

0 commit comments

Comments
 (0)