xla icon indicating copy to clipboard operation
xla copied to clipboard

Fix `GetExecutablePath(..)` for the case when a command flag is passed to the python executable.

Open copybara-service[bot] opened this issue 1 year ago • 0 comments

Fix GetExecutablePath(..) for the case when a command flag is passed to the python executable.

Currently GetExecutablePath(..) returns an empty string if the command python -c '<code splitted by new lines>' is executed. The reason is that the first token in the buffer might be a whitespace or a new line.

To avoid this situation, we check if the flag is -c. If it is, we return the preceding token as an executable path.

copybara-service[bot] avatar Aug 07 '24 22:08 copybara-service[bot]