Skip to content

debugger beta: Fix spawning debug tasks with Fish shell #32032

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

Closed
wants to merge 8 commits into from

Conversation

Anthony-Eid
Copy link
Contributor

This fixes the issue that caused #31743 to revert this commit aab7620

The Fish shell doesn't accept empty strings as arguments. This causes problems when running locators that potentially have empty arguments, like the cargo locator. Thus, it makes it impossible for Zed to properly spawn a debug task based on a locator, which mostly affects debug configs created by a runnable icon.

We now remove task args that are empty after resolving their environmental variables.

Release Notes:

  • N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jun 3, 2025
@WeetHet
Copy link
Contributor

WeetHet commented Jun 19, 2025

I think the better approach would be to do what I and other people already proposed earlier and use /bin/sh for runnables by default so we don't have to adjust our code for all shells

@Anthony-Eid
Copy link
Contributor Author

@WeetHet This PR has been sale since I've been thinking about going with my approach or your idea for a bit. I also got better with the debugger launch too.

I'm leaning towards the /bin/sh idea and defaulting to powershell on windows. I'm just worried if a user has a custom theme or something that affects the output of a command it won't show up if we default to bash/zsh/powershell

@WeetHet
Copy link
Contributor

WeetHet commented Jun 20, 2025

I'm leaning towards the /bin/sh idea and defaulting to powershell on windows. I'm just worried if a user has a custom theme or something that affects the output of a command it won't show up if we default to bash/zsh/powershell

We can add an ability to choose a shell (withou any guarantees than nothing would break), but realistically, user's theme should be the least of our worries and we already acquire the environment properly so nothing else should change

@Anthony-Eid
Copy link
Contributor Author

@WeetHet I talked with the team and we're going with the /bin/sh solution and defaulting to powershell on windows. I'll push a fix for this later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants