Skip to content

Commit

Permalink
Test windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Dec 1, 2023
1 parent dc7c7e8 commit 364051f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
13 changes: 8 additions & 5 deletions crates/cli-shim/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Results

| | `args[0]` | `args_os[0]` | `current_exe` | Ctrl+C |
| ---------------------- | --------- | ------------ | ------------- | ------ |
| Unix non-link: `node` | `node` | `node` | `node` | Yes |
| Unix soft-link: `node` | `node` | `node` | `node` | Yes |
| Unix hard-link: `node` | `node` | `node` | `node` | Yes |
| | `args[0]` | `args_os[0]` | `current_exe` | Ctrl+C |
| ------------------------- | --------- | ------------ | ------------- | ------ |
| Unix non-link: `node` | `node` | `node` | `node` | Yes |
| Unix soft-link: `node` | `node` | `node` | `node` | Yes |
| Unix hard-link: `node` | `node` | `node` | `node` | Yes |
| Windows no-link: `node` | `node` | `node` | `node` | Yes |
| Windows soft-link: `node` | N/A | N/A | N/A | N/A |
| Windows hard-link: `node` | `node` | `node` | `node` | Yes |
9 changes: 9 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
set shell := ["pwsh.exe", "-c"]

init:
cargo install cargo-binstall
cargo binstall cargo-insta cargo-nextest cargo-wasi
Expand Down Expand Up @@ -32,3 +34,10 @@ setup-shims:
cp -f ~/.cargo/shared-target/debug/proto-shim ./shims/node
ln -f ~/.cargo/shared-target/debug/proto-shim ./shims/node-hard
ln -fs ~/.cargo/shared-target/debug/proto-shim ./shims/node-soft

setup-shims-win:
cargo build --workspace
New-Item -ItemType Directory -Force -ErrorAction SilentlyContinue shims
New-Item -ItemType HardLink -Force -Name "shims\node-hard.exe" -Value "target\debug\proto-shim.exe"
New-Item -ItemType SymbolicLink -Force -Name "shims\node-soft.exe" -Value "target\debug\proto-shim.exe"
Copy-Item "target\debug\proto-shim.exe" -Destination "shims\node.exe"

0 comments on commit 364051f

Please sign in to comment.