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

Remove fish --init-command, fixes #9463 #9464

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/poetry/utils/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ def activate(self, env: VirtualEnv) -> int | None:
with env.temp_environ():
if self._name == "nu":
args = ["-e", cmd]
elif self._name == "fish":
args = ["-i", "--init-command", cmd]
else:
args = ["-i"]

Expand All @@ -126,8 +124,8 @@ def activate(self, env: VirtualEnv) -> int | None:
c.sendline(f"emulate bash -c {shlex.quote(f'. {quoted_activate_path}')}")
elif self._name == "xonsh":
c.sendline(f"vox activate {shlex.quote(str(env.path))}")
elif self._name in ["nu", "fish"]:
# If this is nu or fish, we don't want to send the activation command to the
elif self._name in ["nu"]:
# If this is nu, we don't want to send the activation command to the
# command line since we already ran it via the shell's invocation.
pass
else:
Expand Down