Skip to content

[bug] exiting yarn tauri dev with ctrl+c crashes the powershell terminal #3997

@FabianLars

Description

@FabianLars

Describe the bug

This is different then the old ctrl+c bug where it rendered the terminal basically useless. This time it actually exits the terminal 😅

It happens only with yarn if your project uses beforeDevCommand (doesn't seem to matter which manager you use inside the command tho)

It seems to be a yarn@v1 specific problem, pnpm, npm, cargo all work fine (didn't test yarn2+)
image
Note that if you use powershell directly instead of inside of MS Terminal it closes the whole window 🤷


cmd.exe has a similar problem, but it doesn't crash or exit. Instead it just asks if i really want to close the dev process (twice?). Again, only with yarn. All good with pnpm etc.
image
If you manage to insert a J/Y the terminal is completely fine again.

Reproduction

  1. run yarn tauri dev
  2. close the app via ctrl+c (doing that before the app opens is enough)

Expected behavior

No response

Platform and versions

Environment
  › OS: Windows 10.0.19044 X64
  › Webview2: 100.0.1185.50
  › MSVC:
      - Visual Studio Build Tools 2022
  › Node.js: 16.15.0
  › npm: 8.5.5
  › pnpm: 6.32.10
  › yarn: 1.22.18
  › rustup: 1.24.3
  › rustc: 1.60.0
  › cargo: 1.60.0
  › Rust toolchain: stable-x86_64-pc-windows-msvc

Packages
  › @tauri-apps/cli [NPM]: 1.0.0-rc.9
  › @tauri-apps/api [NPM]: 1.0.0-rc.4
  › tauri [RUST]: 1.0.0-rc.8 (no lockfile),
  › tauri-build [RUST]: no manifest (no lockfile),
  › tao [RUST]: no manifest (no lockfile),
  › wry [RUST]: no manifest (no lockfile),

App
  › build-type: bundle
  › CSP: default-src 'self'
  › distDir: ../dist
  › devPath: http://localhost:3000/
  › framework: React

App directory structure
  ├─ dist
  ├─ node_modules
  ├─ src
  └─ src-tauri

Stack trace

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions