Skip to content

Conversation

@eric-maynard
Copy link
Contributor

After #2049, some users reported errors when running the CLI:

./polaris
./polaris: line 71: exec: polaris: not found

I was able to reproduce this and found that reverting one change from #2049 fixes the regression.


export SCRIPT_DIR="${dir}"
exec polaris "$@"
env PYTHONPATH=client/python SCRIPT_DIR="$dir" "${dir}"/polaris-venv/bin/python3 client/python/cli/polaris_cli.py "$@"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one should work as it is now using the installed package instead of invoking the class directly. Do we have a reproducible or I can take a closer look a bit later this weekend (assuming the user removes the old virtualenv and setup the new one)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eric-maynard

I think it may be better to ask users to run polaris --repair instead add back the original code above as this will be a blocker for us to move away from polaris bash script:

➜  polaris git:(main) ./polaris --repair

➜  polaris git:(main) ./polaris
Traceback (most recent call last):
  File "/Users/yong/Desktop/GitHome/test/polaris/polaris-venv/bin/polaris", line 6, in <module>
    sys.exit(main())
             ~~~~^^
  File "/Users/yong/Desktop/GitHome/test/polaris/client/python/cli/polaris_cli.py", line 219, in main
    PolarisCli.execute()
    ~~~~~~~~~~~~~~~~~~^^
  File "/Users/yong/Desktop/GitHome/test/polaris/client/python/cli/polaris_cli.py", line 70, in execute
    client_builder = PolarisCli._get_client_builder(options)
  File "/Users/yong/Desktop/GitHome/test/polaris/client/python/cli/polaris_cli.py", line 175, in _get_client_builder
    raise Exception(
    ...<5 lines>...
    )
Exception: Please provide credentials via either --client-id & --client-secret or --access-token. Alternatively, you may set the environment variables CLIENT_ID & CLIENT_SECRET.

➜  polaris git:(main) cat polaris | grep exec
exec polaris "$@"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me ask, good idea. Separately, IIUC the podman requirement can go away in the future too?

Copy link
Contributor

@MonkeyCanCode MonkeyCanCode Aug 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Podman (docker) requirement for codegen via openapi? If yes, it is already addressed in #2192 but pending for review.

@eric-maynard
Copy link
Contributor Author

closing for now to confirm that --repair can address this -- thanks @MonkeyCanCode !

@github-project-automation github-project-automation bot moved this from PRs In Progress to Done in Basic Kanban Board Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants