-
Notifications
You must be signed in to change notification settings - Fork 372
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
NixOS don't have /bin/bash
!
#1011
Comments
Invoke has a great way to override configuration which can be triggered by a file or an environment variable. You can run invoke with the Particularly for the shell, you can simply set the INVOKE_RUN_SHELL variable I haven't found a way to run pip from export INVOKE_RUN_SHELL=/run/current-system/sw/bin/bash
echo '
from invoke import task
from invoke.context import Context
from invoke.collection import Collection
from invoke.program import Program
import os
@task(default=True)
def show_me_config(ctx: Context):
for key, value in dict(ctx.config.run).items():
env_var = f'INVOKE_RUN_{key.upper()}'
changed = '✅' if env_var in os.environ else f'💡 change with {env_var}'
print(f"{key}={value} ({changed})")
ns = Collection()
ns.add_task(show_me_config)
p = Program("test", ns)
p.run()
' | uv run --with invoke - The output should be something like: asynchronous=False (💡 change with INVOKE_RUN_ASYNCHRONOUS)
disown=False (💡 change with INVOKE_RUN_DISOWN)
dry=False (💡 change with INVOKE_RUN_DRY)
echo=False (💡 change with INVOKE_RUN_ECHO)
echo_stdin=None (💡 change with INVOKE_RUN_ECHO_STDIN)
encoding=None (💡 change with INVOKE_RUN_ENCODING)
env=<DataProxy: {}> (💡 change with INVOKE_RUN_ENV)
err_stream=None (💡 change with INVOKE_RUN_ERR_STREAM)
fallback=True (💡 change with INVOKE_RUN_FALLBACK)
hide=None (💡 change with INVOKE_RUN_HIDE)
in_stream=None (💡 change with INVOKE_RUN_IN_STREAM)
out_stream=None (💡 change with INVOKE_RUN_OUT_STREAM)
echo_format={command} (💡 change with INVOKE_RUN_ECHO_FORMAT)
pty=False (💡 change with INVOKE_RUN_PTY)
replace_env=False (💡 change with INVOKE_RUN_REPLACE_ENV)
shell=/run/current-system/sw/bin/bash (✅)
warn=False (💡 change with INVOKE_RUN_WARN)
watchers=[] (💡 change with INVOKE_RUN_WATCHERS) Note: Only primitive types can be overridden in this way ( |
On NixOS this package is completely useless and also sabotages the usage of other packages that depend on it to function.
On NixOS bash is located here:
The text was updated successfully, but these errors were encountered: