conan icon indicating copy to clipboard operation
conan copied to clipboard

[question] conan 2, win_bash_run and self.run()

Open skoolkid opened this issue 1 year ago • 11 comments

I have a recipe created for conan 1 that uses self.run(cmd, win_bash=True) in its build() method. I want to migrate this recipe to conan 2, in which the win_bash argument is not supported.

So far I've set the conanfile attribute win_bash_run = True, and replaced the win_bash argument with scope='run', but now the build fails with the following error message:

ERROR: win_bash_run=True but tools.microsoft.bash:subsystem configuration not defined

After that I tried running:

conan config set tools.microsoft.bash:subsystem=msys2

before conan build, but while that works for conan 1, it fails for conan 2 because the set subcommand has been removed.

Where do I go from here?

skoolkid avatar Apr 14 '23 13:04 skoolkid