Skip to content

Fix string quoting in conan commands of ci tutorial#173

Merged
czoido merged 2 commits intoconan-io:mainfrom
amachado-pie:fix_ci_project_setup
Jan 20, 2025
Merged

Fix string quoting in conan commands of ci tutorial#173
czoido merged 2 commits intoconan-io:mainfrom
amachado-pie:fix_ci_project_setup

Conversation

@amachado-pie
Copy link
Contributor

@amachado-pie amachado-pie commented Jan 20, 2025

Fixes #174

Running: conan remote remove *
Traceback (most recent call last):
  File "/home/amachado/stuff/examples2/ci/game/project_setup.py", line 94, in <module>
    project_setup()
  File "/home/amachado/stuff/examples2/ci/game/project_setup.py", line 64, in project_setup
    run("conan remote remove *")
  File "/home/amachado/stuff/examples2/ci/game/project_setup.py", line 33, in run
    raise Exception("Failed cmd: {}\n{}".format(cmd, output))
Exception: Failed cmd: conan remote remove *
usage: conan remote [-h] [-v [V]] [-cc CORE_CONF] {remove} ...
conan remote: error: unrecognized arguments: engine game graphics mapviewer mathlib project_setup.py run_example.py
ERROR: Exiting with code: 2

The error occurs because the * wildcard is being expanded by the shell to include all files and directories in the current directory, which is not what the conan remote disable command expects.
To pass the * as a literal argument to the conan command without being expanded by the shell, we should use quotes around the *.
This way, the * is passed as a literal argument to the conan command, and it will not be expanded by the shell.

@CLAassistant
Copy link

CLAassistant commented Jan 20, 2025

CLA assistant check
All committers have signed the CLA.

@AbrilRBS
Copy link
Member

Hi @amachado-pie thanks a lot for taking the time to fix this, we appreciate it :)

@czoido czoido merged commit 2f0988e into conan-io:main Jan 20, 2025
4 checks passed
@amachado-pie amachado-pie deleted the fix_ci_project_setup branch January 20, 2025 16:08
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.

CI tutorial - project_setup.py fails in Linux

5 participants