fix(windows): install bugfixes for workspaces, tarballs, and relative paths (#8813)

* more tests

* update migration.zig

* fix up paths

* update tests

* update tests

* test

* test

* update registry tests

* comments

* early exit if stream is invalid

* dont pass invalid_fd to openFileAtWindows

* fix merge

* misc crash fix

* make this use optional pointers instead of 0xaa

* ensure absolute paths are propagated properly

* package.json expects forward slash

* this assert was invalid

* add panic checks

* pass bun-remove

* more panic checks

* test: pass bun-add

* querying these hangs outside bun too

* fix compile error from merge conflict resolution

* use compileError instead of comptime unreachable

* tidy

* bunx: check for the .exe bin extension

* bunx: another route to make cache path if it doesnt exist

* install: another case of FolderResolution.getOrPut expecting absolute path

* fix a bun install crash

* dont print zig stack trace if bun install fails

* test: pass bun-link

* test: bunx: add more expects

* test: bun-install-registry: pass

* test: bun-install: pass

* test: bun-pm: pass

* fix merge main error

* fix posix tests

* fix last failing test in bun-install.test.ts
symlink difference between platforms

* bun-install-registry.test.ts fix

* bun-run.test.ts: remove stray console log

---------

Co-authored-by: Meghan Denny <meghan@bun.sh>
Co-authored-by: Meghan Denny <hello@nektro.net>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
This commit is contained in:
Dylan Conway
2024-03-18 22:34:15 -07:00
committed by GitHub
parent 06f04b584c
commit bf0e5a82f7
35 changed files with 981 additions and 405 deletions

View File

@@ -747,7 +747,7 @@ pub const StandaloneModuleGraph = struct {
const nt_path = bun.strings.addNTPathPrefix(&nt_path_buf, image_path);
return bun.sys.openFileAtWindows(
bun.invalid_fd,
bun.FileDescriptor.cwd(),
nt_path,
// access_mask
w.SYNCHRONIZE | w.GENERIC_READ,