Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] before*Command should be relative to config file #3551

Closed
JonasKruckenberg opened this issue Feb 24, 2022 · 3 comments
Closed

[bug] before*Command should be relative to config file #3551

JonasKruckenberg opened this issue Feb 24, 2022 · 3 comments
Labels
type: breaking change This issue or pull request will introduce a breaking change and requires major version bump type: bug

Comments

@JonasKruckenberg
Copy link
Contributor

Describe the bug

The command ran from before*Command is relative to *the nearest package.json relative to the clis cwdthis is weird enough on it's own, but causes real confusion whencding as part of the command, since all other paths in tauri.conf.jsonare relative to thetauri_dir`.

Reproduction

No response

Expected behavior

No response

Platform and versions

Operating System - Mac OS, version 12.2.0 X64
WARNING: no lock files found, defaulting to npm

Node.js environment
  Node.js - 16.13.2
  @tauri-apps/cli - 1.0.0-rc.4 (outdated, latest: 1.0.0-rc.5)
  @tauri-apps/api - Not installed

Global packages
  npm - 8.1.2
  pnpm - 6.30.1
  yarn - 3.1.0

Rust environment
  rustup - 1.24.3
  rustc - 1.58.1
  cargo - 1.58.0
  toolchain - stable-aarch64-apple-darwin 

App directory structure
/cypress
/dist
/node_modules
/public
/.vite
/src

App
  tauri - 1.0.0-rc.3 (no lockfile)
  tauri-build - no manifest (no lockfile)
  tao - no manifest (no lockfile)
  wry - no manifest (no lockfile)
  build-type - bundle
  CSP - default-src 'self' style-src 'self' 'unsafe-inline' connect-src http://localhost:55001
  distDir - ../../plz-out/gen/frontend/dist/client
  devPath - http://localhost:3000/
  framework - React

Stack trace

No response

Additional context

No response

@amrbashir
Copy link
Member

I think if before*Command contains usage of package managers, yarn, pnpm, npm, they all execute the scripts relative to nearest package.json.

@lucasfernog
Copy link
Member

I think we had issues before with it being executed with tauri_dir as CWD. But I was planning to also add an option to set a custom CWD so we could change it.

@lucasfernog lucasfernog added the type: breaking change This issue or pull request will introduce a breaking change and requires major version bump label Jul 4, 2022
@amrbashir
Copy link
Member

Seems like this has been implemented and you can set cwd for it now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: breaking change This issue or pull request will introduce a breaking change and requires major version bump type: bug
Projects
None yet
Development

No branches or pull requests

3 participants