okteto icon indicating copy to clipboard operation
okteto copied to clipboard

okteto deploy doesn't accept absolute paths on windows

Open jLopezbarb opened this issue 2 years ago • 3 comments

Describe the bug When I run an executable, from an absolute path on windows it's not finding the correct executable because it's removing all backslash

deploy:
  - C:\Users\myuser\Repos\okteto\bin\okteto.exe deploy -f requirements.txt

To Reproduce Steps to reproduce the behavior:

  1. Copy the yaml posted above
  2. Run okteto.exe deploy
  3. It will fail with the following error:
 i  Using jlopezbarb @ cloud.okteto.com as context
 i  Images were already built. To rebuild your images run 'okteto build' or 'okteto deploy --build'
 i  Running C:\Users\javif\Repos\okteto\bin\okteto.exe deploy -f requirements.txt
/bin/bash: C:UsersjavifReposoktetobinokteto.exe: command not found

Expected behavior I expect this to work on windows the same way it works on linux

Desktop (please complete the following information):

  • OS: Windows
  • Version 2.4.0

jLopezbarb avatar Jun 20 '22 09:06 jLopezbarb

@AgustinRamiroDiaz Do you know what can cause the removal of the backslash when running this command: C:\\Windows\\system32\\bash.exe C:\Users\javif\Repos\okteto\bin\okteto.exe deploy -f requirements.txt

jLopezbarb avatar Jun 20 '22 09:06 jLopezbarb

This bug is also happenning on 2.3, 2.2, 2.1 and 2.0 versions

jLopezbarb avatar Jun 20 '22 10:06 jLopezbarb

@jLopezbarb maybe it's related to this issue https://github.com/okteto/okteto/issues/2592

Seems like it's trying to run from bash inside wsl, that's why the message is /bin/bash: C:UsersjavifReposoktetobinokteto.exe: command not found (in windows bin/bash should throw a different error since it shouldn't exist) and that could be the reason for the exclusion of the \

AgustinRamiroDiaz avatar Jul 11 '22 13:07 AgustinRamiroDiaz