devspace icon indicating copy to clipboard operation
devspace copied to clipboard

Path broken for custom commands after 5.18.0

Open mykiep opened this issue 3 years ago • 6 comments

What happened? Custom commands that were working in 5.17.0 stopped working after upgrading to 5.18.0+.

What did you expect to happen instead? The Path should be loaded and npm commands should execute

How can we reproduce the bug? (as minimally and precisely as possible)

My devspace.yaml:

- name: "test-path"
  command: "npm -v"
...

Devspace version 5.17.0 worked fine

C:\test>devspace -v
devspace version 5.17.0
C:\test>devspace run test-path
6.14.16

When upgrading to any version after 5.18.0, it stops working

C:\test>devspace upgrade
[done] √ Successfully updated to version 5.18.4
[info]   Release note:
...
C:\test>devspace -v
devspace version 5.18.4
C:\test>devspace run test-path
'npm' is not recognized as an internal or external command,
operable program or batch file.

Local Environment:

  • DevSpace Version: 5.18.0 - 5.18.4
  • Operating System: windows
  • ARCH of the OS: AMD64 Kubernetes Cluster:
  • Cloud Provider: aws
  • Kubernetes Version: 1.22.2

Anything else we need to know? I believe that this is a path issue as when I print the path variable in a command, it is separated by ":" instead of ";". I tested this by updated the command to "echo $Path"

/kind bug

mykiep avatar Feb 24 '22 22:02 mykiep

@mykiep thanks for reporting this issue! We'll take a look!

FabianKramm avatar Feb 25 '22 08:02 FabianKramm

Hello I am facing the same issue. Just upgraded from 5.17.0 to 5.18.5 and got an error:

'.' is not recognized as an internal or external command, operable program or batch file

The odd thing is that I am not even calling an executable but just providing a path to a build script like stated in the docs.

images:
...
  custom:
    command: ./scripts/run-build.bat

I have also tried running inside a powershell and gitbash, with and without the trailing ./ and also using commands and providing os: windows. Same result every time.

The scripts folder is on the same level as the devspace.yaml file.

Quasarman avatar Jun 27 '22 19:06 Quasarman

@Quasarman @mykiep does this problem still occur on DevSpace v6?

FabianKramm avatar Nov 07 '22 15:11 FabianKramm

@FabianKramm

I cant really tell since we switched from using gradle to just using devspace. That said we haven't had time to upgrade to v6 yet.

Quasarman avatar Nov 07 '22 15:11 Quasarman

I haven't been able to try devspace 6+ since kaniko support for building in a remote kubernetes cluster seems to be broken. I haven't been able to submit a ticket for that yet.

mykiep avatar Nov 07 '22 23:11 mykiep

I created ticket #2412 for the devspace 6 issue.

mykiep avatar Nov 08 '22 21:11 mykiep