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

vf globalpackages exception #251

Open
4 tasks done
danielkleinert opened this issue Oct 9, 2024 · 3 comments
Open
4 tasks done

vf globalpackages exception #251

danielkleinert opened this issue Oct 9, 2024 · 3 comments
Labels

Comments

@danielkleinert
Copy link

  • I am using Fish shell version 3.1 or higher.

  • I am using Python version 3.8 or higher.

  • I have searched the issues (including closed ones) and believe that this is not a duplicate.

  • If related to a plugin, I prefixed the issue title with the name of the plugin.

  • OS version and name: macOS 15.1 Beta (24B5055e)

  • Fish shell version: 3.7.1

  • VirtualFish version: 2.5.9

Issue

I've run into the following error.

╰─❯ vf globalpackages
[: Missing argument at index 3
true =
       ^
~/.local/pipx/venvs/virtualfish/lib/python3.12/site-packages/virtualfish/virtual.fish (line 751): 
	    if [ "true" = (command sed -n 's/include-system-site-packages\s=\s\(true\|false\)/\1/p' $VIRTUALFISH_VENV_CONFIG_FILE) ]
	       ^
in function '__vfsupport_globalpackages_toggle'
	called on line 1 of file ~/.local/pipx/venvs/virtualfish/lib/python3.12/site-packages/virtualfish/virtual.fish
in function '__vf_globalpackages'
	called on line 1 of file ~/.local/pipx/venvs/virtualfish/lib/python3.12/site-packages/virtualfish/virtual.fish
in function 'vf' with arguments 'globalpackages'
sed: 1: "pyvenv.cfg": extra characters at the end of p command
Global site packages enabled.

This is the content of my $VIRTUAL_ENV/$VIRTUALFISH_VENV_CONFIG_FILE:

home = /opt/homebrew/Cellar/[email protected]/3.12.6/bin
implementation = CPython
version_info = 3.12.6.final.0
virtualenv = 20.26.6
include-system-site-packages = false
base-prefix = /opt/homebrew/Cellar/[email protected]/3.12.6/Frameworks/Python.framework/Versions/3.12
base-exec-prefix = /opt/homebrew/Cellar/[email protected]/3.12.6/Frameworks/Python.framework/Versions/3.12
base-executable = /opt/homebrew/Cellar/[email protected]/3.12.6/Frameworks/Python.framework/Versions/3.12/bin/python3.12
@danielkleinert
Copy link
Author

╰─❯ sed -n 's/include-system-site-packages[[:space:]]= \(false\)/\1/p'  $VIRTUAL_ENV/pyvenv.cfg
false
╰─❯ sed -n 's/include-system-site-packages\s= \(false\)/\1/p'  $VIRTUAL_ENV/pyvenv.cfg

╰─❯ sed -n 's/include-system-site-packages[[:space:]]= \(true\|false\)/\1/p'  $VIRTUAL_ENV/pyvenv.cfg

I do not comprehend. Is sed broken, or am I?

justinmayer added a commit that referenced this issue Oct 9, 2024
@justinmayer
Copy link
Owner

I don't think you are the one who is broken, Daniel. I am seeing similar weird behavior with sed.

I didn't write the code in question, but I think I may have fixed it in: adec285

Can you try that and see if it fixes the problem for you?

@danielkleinert
Copy link
Author

That did it! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants