Scripts work under pwsh on Linux and macOS
Home, VS Code user folder and CLI are resolved per platform (with VSCODE_USER_DIR as an override); dev-link makes a symlink where a junction is not available. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0169iPWwKHZoBTNN9qwXiwqk
This commit is contained in:
@@ -37,7 +37,7 @@ So settings live in [`User/`](User/) as ordinary files, and
|
||||
less magic than Settings Sync and more legible: a diff shows what changed.
|
||||
|
||||
It **copies rather than symlinks** on purpose. A symlink at
|
||||
`%APPDATA%\Code\User\settings.json` is fragile — an editor that saves atomically (write
|
||||
`Code/User/settings.json` is fragile — an editor that saves atomically (write
|
||||
a temp file, rename it over the target) replaces the link with a regular file, and the
|
||||
sync stops without anything looking broken.
|
||||
|
||||
@@ -75,7 +75,7 @@ Never in this repo. `publish.ps1` and `install.ps1` read, in order:
|
||||
|
||||
1. `-Token <value>`
|
||||
2. `$env:GITEA_TOKEN`
|
||||
3. `%USERPROFILE%\.gitea-token`
|
||||
3. `~/.gitea-token` (`%USERPROFILE%\.gitea-token` on Windows)
|
||||
|
||||
Create one at `<gitea>/user/settings/applications` with **`write:repository`** scope.
|
||||
`install.ps1` only reads, so a `read:repository` token is enough there — and if the
|
||||
@@ -176,5 +176,8 @@ once installed. Both were checked by hand.
|
||||
- **`dev-link.ps1` and `install.ps1` conflict.** A junctioned source and an installed
|
||||
`.vsix` are two copies of the same extension id; VS Code loads one arbitrarily.
|
||||
`dev-link.ps1 -Unlink` before installing.
|
||||
- **Windows-only paths.** The scripts assume `%APPDATA%\Code\User` and
|
||||
`%USERPROFILE%\.vscode\extensions`. `ci-release.sh` is the portable half.
|
||||
- **Linux and macOS need pwsh.** The scripts run under PowerShell 7 (`pwsh`) there and
|
||||
find VS Code's user folder at `~/.config/Code/User` (`~/Library/Application Support/Code/User`
|
||||
on macOS) and the CLI in the usual apt, snap, flatpak and Homebrew locations. Set
|
||||
`VSCODE_USER_DIR` for Insiders or a portable install. `dev-link.ps1` makes a symlink
|
||||
instead of a junction. `ci-release.sh` needs only bash.
|
||||
|
||||
Reference in New Issue
Block a user