Skip to content

"command not found\n" Is shown even when a network config is provided. #5

@texcreativity

Description

@texcreativity

Curl does not seem to be working

This code

from just_bash import Bash, NetworkConfig
from just_bash.fs import ReadWriteFs, ReadWriteFsOptions

fs = ReadWriteFs(ReadWriteFsOptions(root=r"C:\Users\user\Desktop\py\p0"))
network=NetworkConfig( allowed_url_prefixes=[["https://", "http://"]] )
bash = Bash(fs=fs, cwd="/", network=network)

result = bash.run("curl -I https://httpbin.org/ip")
print(result)
`
Output

ExecResult(stdout='', stderr='bash: curl: command not found\n', exit_code=127, env={'PATH': '/usr/local/bin:/usr/bin:/bin', 'HOME': '/home/user', 'USER': 'user', 'SHELL': '/bin/bash', 'PWD': '/', '?': '127', 'SHLVL': '1', 'BASH_VERSION': '5.0.0(1)-release', 'OPTIND': '1', 'PIPESTATUS_0': '127', 'PIPESTATUS__length': '1'})

Environment

Currently installed version 0.16

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions