Skip to content

Commit f479142

Browse files
code-cursor: fix passing arg to cli on darwin
Currently if you try to pass arguments to cursor on the cli on Darwin, it just opens the app instead of respecting arguments like -h. This takes cues from how vscode is packaged and symlinks to the app's bin rather than creating an app wrapper.
1 parent 6514427 commit f479142

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pkgs/by-name/co/code-cursor/package.nix

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,10 @@ stdenvNoCC.mkDerivation {
167167
168168
${lib.optionalString hostPlatform.isDarwin ''
169169
APP_DIR="$out/Applications"
170-
CURSOR_APP="$APP_DIR/Cursor.app"
171170
mkdir -p "$APP_DIR"
172171
cp -Rp Cursor.app "$APP_DIR"
173172
mkdir -p "$out/bin"
174-
cat << EOF > "$out/bin/cursor"
175-
#!${stdenvNoCC.shell}
176-
open -na "$CURSOR_APP" --args "\$@"
177-
EOF
178-
chmod +x "$out/bin/cursor"
173+
ln -s "$APP_DIR/Cursor.app/Contents/Resources/app/bin/cursor" "$out/bin/cursor"
179174
''}
180175
181176
runHook postInstall

0 commit comments

Comments
 (0)