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

JFrogPip@1: /bin/sh: 1: source: not found #498

Open
mlasch opened this issue Jul 25, 2024 · 0 comments
Open

JFrogPip@1: /bin/sh: 1: source: not found #498

mlasch opened this issue Jul 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mlasch
Copy link

mlasch commented Jul 25, 2024

Describe the bug

The documentation describes how to use a Python virtualenv with the JFrogPip@1 Azure DevOps task: https://github.com/jfrog/jfrog-azure-devops-extension?tab=readme-ov-file#JFrog-Pip-Task
The variable virtualEnvActivation should contain a command to source the activation script.

source /path/to/venv/bin/activate

However the task will run the command in sh which does not support source. It works by using . which is POSIX and not bash (and some other shell) specific.

. /path/to/venv/bin/activate

https://nodejs.org/api/child_process.html#child_processexecsynccommand-options
child_process.execSync(command[, options])

shell [...] Shell to execute the command with. [...] Default: '/bin/sh' on Unix.

Current behavior

Executing JFrog CLI Command:
source /home/test/workspace/agent/4/s/venv/bin/activate && /home/test/workspace/agent/_tool/jf/2.56.1/x64/jf pip install mypackage
/bin/sh: 1: source: not found
##[error]Error: Command failed: source /home/test/workspace/agent/4/s/venv/bin/activate

Reproduction steps

Run the JFrogPip@1 task in Azure DevOps using a venv with virtualEnvActivation as described in the documentation.

Expected behavior

No response

Azure DevOps extension name and version

JFrogPip@1

JFrog CLI version

JFrog CLI version: 2.56.1

Operating system type and version

Debian 12

JFrog Artifactory version (if relevant)

No response

JFrog Xray version (if relevant)

No response

JFrog Distribution version (if relevant)

No response

@mlasch mlasch added the bug Something isn't working label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant