Skip to content

Commit 40841c9

Browse files
committed
test(desktop): keep skipping the unwritable-directory test on Windows
chmod cannot make a Windows directory unwritable; the skip was dropped with the platform gates. Also updates the README for Git Bash's cwd.
1 parent 9c8306a commit 40841c9

2 files changed

Lines changed: 20 additions & 14 deletions

File tree

‎apps/desktop/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ The Windows build is a one-click, per-user NSIS installer (`Sim-<version>-x64.ex
207207
- Updates: the NSIS updater requests `latest.yml` from the same `/api/desktop/update` feed. `ready` is reached when electron-updater's own `update-downloaded` fires (after the publisher check); there is no native staging step. A confirmed restart runs the installer silently and relaunches. Builds without a packaged `app-update.yml` fall back to the manual-download pipeline. Deltas use `.exe.blockmap`.
208208
- Publication: Windows publishes independently of macOS. `desktop-signing-windows` probes the Azure configuration and skips with a warning until it exists; unsigned Windows builds are never published. No job waits on the Windows calls, so a Windows failure never blocks the macOS release, and the feed treats a release without `latest.yml` as having no Windows build (Windows shells keep the newest release that has one). `latest.yml` is uploaded last.
209209
- SmartScreen: a new signing identity starts without download reputation, so early installers can show "Windows protected your PC" until reputation builds. Keep the same certificate profile across releases.
210-
- Terminal: runs PowerShell 7 (`pwsh.exe`) when it is on `Path`, else Windows PowerShell 5.1, else cmd, which has no shell integration, so the agent cannot run commands in it. `SHELL` set to a Windows path (`C:\Program Files\Git\bin\bash.exe`) selects Git Bash, whose `/c/...` directories are reported in Windows form. PowerShell starts with `-NoProfile -NoExit -EncodedCommand`: the script emits the startup marker, loads the user's profiles in PowerShell's order under their own execution policy, then wraps `prompt` and PSReadLine's `PSConsoleHostReadLine` to emit the OSC 633 markers (no PSReadLine, no integration). Stop sends Ctrl-C, then `taskkill /T /F` to each of the shell's child processes. tmux and terminal themes are macOS and Linux only. `src/main/terminal/windows-shells.test.ts` drives PowerShell 7, Windows PowerShell 5.1 and Git Bash through ConPTY on the Windows CI leg.
210+
- Terminal: runs PowerShell 7 (`pwsh.exe`) when it is on `Path`, else Windows PowerShell 5.1, else cmd, which has no shell integration, so the agent cannot run commands in it. `SHELL` set to a Windows path (`C:\Program Files\Git\bin\bash.exe`) selects Git Bash; its init file reads `/etc/profile` as a login shell would (for the MSYS `PATH`) and reports the cwd through `cygpath -w`. PowerShell starts with `-NoProfile -NoExit -EncodedCommand`: the script emits the startup marker, loads the user's profiles in PowerShell's order under their own execution policy, then wraps `prompt` and PSReadLine's `PSConsoleHostReadLine` to emit the OSC 633 markers (no PSReadLine, no integration). Stop sends Ctrl-C, then `taskkill /T /F` to each of the shell's child processes. tmux and terminal themes are macOS and Linux only. `src/main/terminal/windows-shells.test.ts` drives PowerShell 7, Windows PowerShell 5.1 and Git Bash through ConPTY on the Windows CI leg.
211211
- Native local-file tools: ship with the checks described in [Local filesystem access](#local-filesystem-access).
212212
- Not available on Windows yet: native Computer Use and importing from other browsers.
213213

‎apps/desktop/src/main/desktop-executor/service.test.ts‎

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -311,20 +311,26 @@ describe('desktop executor registration', () => {
311311
}
312312
})
313313

314-
it('registers with no install id it could not save', async () => {
315-
const userData = await mkdtemp(join(tmpdir(), 'sim-executor-service-'))
316-
await chmod(userData, 0o500)
317-
try {
318-
const { sim, desktopExecutor } = await service(1, userData)
319-
320-
desktopExecutor.start()
321-
await sleep(200)
322-
323-
expect(sim.requests.filter((request) => request.includes('/api/desktop/devices'))).toEqual([])
324-
} finally {
325-
await chmod(userData, 0o700)
314+
// chmod cannot make a Windows directory unwritable.
315+
it.skipIf(process.platform === 'win32')(
316+
'registers with no install id it could not save',
317+
async () => {
318+
const userData = await mkdtemp(join(tmpdir(), 'sim-executor-service-'))
319+
await chmod(userData, 0o500)
320+
try {
321+
const { sim, desktopExecutor } = await service(1, userData)
322+
323+
desktopExecutor.start()
324+
await sleep(200)
325+
326+
expect(sim.requests.filter((request) => request.includes('/api/desktop/devices'))).toEqual(
327+
[]
328+
)
329+
} finally {
330+
await chmod(userData, 0o700)
331+
}
326332
}
327-
})
333+
)
328334

329335
it('keeps its install id through a read failure instead of minting a new one', async () => {
330336
const userData = await mkdtemp(join(tmpdir(), 'sim-executor-service-'))

0 commit comments

Comments
 (0)