Skip to content

Commit 07729d3

Browse files
committed
Fix pnpm invocations on Windows
They didn't work with 'export', so `cross-env` is used to set environment variables in a cross-platform compatible fashion.
1 parent 68aeafd commit 07729d3

File tree

2 files changed

+52
-31
lines changed

2 files changed

+52
-31
lines changed

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"scripts": {
1111
"dev:ui": "pnpm --filter @gitbutler/ui storybook",
1212
"dev:web": "turbo watch --filter @gitbutler/web dev",
13-
"dev:desktop": "export CARGO_TARGET_DIR=$PNPM_SCRIPT_SRC_DIR/target/tauri && cargo build -p but && cargo build -p gitbutler-git && pnpm tauri dev",
13+
"dev:desktop": "cross-env CARGO_TARGET_DIR=$PNPM_SCRIPT_SRC_DIR/target/tauri pnpm dev:desktop-with-env",
14+
"dev:desktop-with-env": "cargo build -p but && cargo build -p gitbutler-git && pnpm tauri dev",
1415
"dev:internal-tauri": "turbo watch --filter @gitbutler/desktop dev",
1516
"package": "turbo run package",
1617
"test": "turbo run test --no-daemon",
@@ -24,7 +25,7 @@
2425
"build:test": "pnpm exec tauri build --config crates/gitbutler-tauri/tauri.conf.test.json -- --profile dev",
2526
"start:desktop": "pnpm --filter @gitbutler/desktop run preview",
2627
"check": "turbo run check --no-daemon",
27-
"tauri": "export CARGO_TARGET_DIR=$PNPM_SCRIPT_SRC_DIR/target/tauri && tauri",
28+
"tauri": "cross-env CARGO_TARGET_DIR=$PNPM_SCRIPT_SRC_DIR/target/tauri tauri",
2829
"lint": "turbo run //#globallint --no-daemon",
2930
"globallint": "prettier --check . && eslint .",
3031
"prettier": "prettier --check",
@@ -42,6 +43,7 @@
4243
"@types/eslint": "9.6.1",
4344
"@types/node": "^22.17.0",
4445
"@typescript-eslint/parser": "^8.39.0",
46+
"cross-env": "^10.1.0",
4547
"eslint": "^9.33.0",
4648
"eslint-config-prettier": "^10.1.8",
4749
"eslint-import-resolver-next": "^0.6.0",

pnpm-lock.yaml

Lines changed: 48 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)