mirror of
https://github.com/coder/code-server.git
synced 2026-09-05 09:41:17 +02:00
Run mklink through cmd so windows postinstall works (#7982)
npm install fails on Windows in postinstall with "mklink: command not found". mklink is a cmd.exe builtin rather than an executable, so the sh running this script cannot exec it, and every symlink the install needs is made this way. The doubled slashes are the usual MSYS escaping, and are safe here because this branch only runs when the OS was detected as cygwin or mingw.
This commit is contained in:
@@ -18,7 +18,7 @@ symlink() {
|
||||
dest="$2"
|
||||
rm -rf "$dest"
|
||||
case $OS in
|
||||
windows) mklink /J "$dest" "$source" ;;
|
||||
windows) cmd //c mklink //J "$dest" "$source" ;;
|
||||
*) ln -s "$source" "$dest" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user