Skip to content

Conversation

@Hahihula
Copy link
Collaborator

now space in python or scoop path should no longer be problem.

@Hahihula Hahihula force-pushed the EIM-443-fix-space-in-path-error branch 3 times, most recently from 5f84c12 to 44badd0 Compare January 28, 2026 09:11
Copy link
Collaborator

@alirana01 alirana01 left a comment

Choose a reason for hiding this comment

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

Question about the dual execution approach

Thanks for the fix! I have a question about the design:

With the new escaping in execute_command(), shell features like variable expansion ($HOME) and globs are now blocked. Given that:

Function Shell overhead Handles spaces Shell features
execute_command() Yes Yes (via escaping) No (blocked by escaping)
execute_command_direct() No Yes (native) No

Question: What's the benefit of keeping execute_command() going through bash/PowerShell if escaping prevents shell features anyway? It seems like we now have shell overhead without shell benefits.

Suggestions

  1. Could execute_command() just call execute_command_direct() internally? The only difference now is PATH resolution and shell environment.

  2. Only create_python_venv() was updated to use execute_command_direct(). Other functions in python_utils.rs that take python paths could also have space issues:

    • detect_python_version() (line 401)
    • run_python_script() (line 786)
    • get_python_version() (line 818)

My apologies for asking clarifications in review

@Hahihula
Copy link
Collaborator Author

Question about the dual execution approach

Thanks for the fix! I have a question about the design:

With the new escaping in execute_command(), shell features like variable expansion ($HOME) and globs are now blocked. Given that:

Function Shell overhead Handles spaces Shell features
execute_command() Yes Yes (via escaping) No (blocked by escaping)
execute_command_direct() No Yes (native) No
Question: What's the benefit of keeping execute_command() going through bash/PowerShell if escaping prevents shell features anyway? It seems like we now have shell overhead without shell benefits.

Suggestions

  1. Could execute_command() just call execute_command_direct() internally? The only difference now is PATH resolution and shell environment.

  2. Only create_python_venv() was updated to use execute_command_direct(). Other functions in python_utils.rs that take python paths could also have space issues:

    • detect_python_version() (line 401)
    • run_python_script() (line 786)
    • get_python_version() (line 818)

My apologies for asking clarifications in review

when you are saying Shell features you meant expansion of $HOME variable, but the diferences are with lot more variables and environment settings. Generaly we should be migrating to the execute_command_direct but it is out of scope of these change to do this refactoring for whole codebase.

@alirana01
Copy link
Collaborator

Question about the dual execution approach

Thanks for the fix! I have a question about the design:
With the new escaping in execute_command(), shell features like variable expansion ($HOME) and globs are now blocked. Given that:
Function Shell overhead Handles spaces Shell features
execute_command() Yes Yes (via escaping) No (blocked by escaping)
execute_command_direct() No Yes (native) No
Question: What's the benefit of keeping execute_command() going through bash/PowerShell if escaping prevents shell features anyway? It seems like we now have shell overhead without shell benefits.

Suggestions

  1. Could execute_command() just call execute_command_direct() internally? The only difference now is PATH resolution and shell environment.

  2. Only create_python_venv() was updated to use execute_command_direct(). Other functions in python_utils.rs that take python paths could also have space issues:

    • detect_python_version() (line 401)
    • run_python_script() (line 786)
    • get_python_version() (line 818)

My apologies for asking clarifications in review

when you are saying Shell features you meant expansion of $HOME variable, but the diferences are with lot more variables and environment settings. Generaly we should be migrating to the execute_command_direct but it is out of scope of these change to do this refactoring for whole codebase.

and do we need to update the calls in these

  • detect_python_version() (line 401)
  • run_python_script() (line 786)
  • get_python_version() (line 818)

as I believe one of the recent issue #366 could also be related to this

@Hahihula
Copy link
Collaborator Author

Question about the dual execution approach

Thanks for the fix! I have a question about the design:
With the new escaping in execute_command(), shell features like variable expansion ($HOME) and globs are now blocked. Given that:
Function Shell overhead Handles spaces Shell features
execute_command() Yes Yes (via escaping) No (blocked by escaping)
execute_command_direct() No Yes (native) No
Question: What's the benefit of keeping execute_command() going through bash/PowerShell if escaping prevents shell features anyway? It seems like we now have shell overhead without shell benefits.

Suggestions

  1. Could execute_command() just call execute_command_direct() internally? The only difference now is PATH resolution and shell environment.

  2. Only create_python_venv() was updated to use execute_command_direct(). Other functions in python_utils.rs that take python paths could also have space issues:

    • detect_python_version() (line 401)
    • run_python_script() (line 786)
    • get_python_version() (line 818)

My apologies for asking clarifications in review

when you are saying Shell features you meant expansion of $HOME variable, but the diferences are with lot more variables and environment settings. Generaly we should be migrating to the execute_command_direct but it is out of scope of these change to do this refactoring for whole codebase.

and do we need to update the calls in these

  • detect_python_version() (line 401)
  • run_python_script() (line 786)
  • get_python_version() (line 818)

as I believe one of the recent issue #366 could also be related to this

You are completely right. It should be used in the whole process of the python module. I would swear i wrote it ... sorry.
Thanks for the catch.

alirana01
alirana01 previously approved these changes Feb 2, 2026
@Hahihula Hahihula force-pushed the EIM-443-fix-space-in-path-error branch 17 times, most recently from 89746c2 to 43e02cf Compare February 6, 2026 11:30
@Hahihula Hahihula force-pushed the EIM-443-fix-space-in-path-error branch 8 times, most recently from f3d0eb5 to 6fd8dbf Compare February 9, 2026 12:03
@Hahihula Hahihula force-pushed the EIM-443-fix-space-in-path-error branch from 6fd8dbf to 95602ca Compare February 9, 2026 12:56
@Hahihula Hahihula force-pushed the EIM-443-fix-space-in-path-error branch 5 times, most recently from 7716ce1 to 03c52f3 Compare February 10, 2026 08:42
@Hahihula Hahihula force-pushed the EIM-443-fix-space-in-path-error branch from 03c52f3 to d529adc Compare February 10, 2026 09:35
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