tilt-extensions
tilt-extensions copied to clipboard
kubefwd problem with mktemp suffix argument
Hey, sorry if this is an issue but it is by design.
When using the kubefwd extension on mac, it fails with an error about the --suffix
argument.
I believe the version of mktemp
on mac doesn't support this argument.
Maybe we can use a prefix instead?
I know the extensions says it requires coreutils
to be installed, but homebrew by default prefixs everything with g, so the binary is actually gmktemp
and replacing these things on OS by changing the path or something.
The workaround was to execute tilt with PATH=/usr/local/opt/coreutils/gnubin:$PATH
. However, even after that the script is trying to run /Users/username/Library/Application
because it is not escaping/wrapping in quotes the path which is supposed to be /Users/username/Libarary/Application Support/tilt-dev/tilt_modules/github.com/tilt-dev/tilt-extensions/kubefwd/run-kubefwd.sh
, but this seems to be more a problem on how local_resource
serve_cmd
is setup.
Maybe we can make it more accessible somehow? I'm happy to submit a PR if that is what we are aiming for.
Thanks.
thanks for the report!
- i think the suffix bit is purely cosmetic, so it's probably fine to remove it.
- not sure what the escaping issue is about, let me poke around at that...
@nicks @bamorim I'm facing the same issue regarding the space escaping.
I've tried to add a backlash in the path when there is a space in the sudo-kubefed.sh
script:
RUN_KUBEFWD=$(echo "$RUN_KUBEFWD" | sed 's/ /\\ /g')
DIR=$(echo "$DIR" | sed 's/ /\\ /g')
but then get a :
+ /usr/bin/osascript -e 'do shell script "/Users/eric/Library/Application\ Support/tilt-dev/tilt_modules/github.com/tilt-dev/tilt-extensions/kubefwd/run-kubefwd.sh /opt/homebrew/bin/kubefwd /Users/eric/.kube/config /opt/homebrew/bin/entr /var/folders/xh/003_hq_j3qq29mtv3nn8kw6c0000gn/T//tilt-kubefwd.nXOFvvLqd" with administrator privileges'
./sudo-kubefwd.sh: line 43: /Users/eric/Library/Application\ Support/tilt-dev/tilt_modules/github.com/tilt-dev/tilt-extensions/kubefwd/watch-namespaces.sh: No such file or directory
49:50: syntax error: Expected “"” but found unknown token. (-2741)
@erickhun i left a comment on the other issue you filed - https://github.com/tilt-dev/tilt-extensions/issues/368, thanks for reporting!