Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

update-codegen.sh errors out on linux #12

Closed
surajssd opened this issue May 29, 2019 · 1 comment · Fixed by #63
Closed

update-codegen.sh errors out on linux #12

surajssd opened this issue May 29, 2019 · 1 comment · Fixed by #63

Comments

@surajssd
Copy link
Contributor

When the script is run I get following errors:

$ hack/update-codegen.sh 
###### Generating Traffic Split Client ######
hack/update-codegen.sh: line 14: cd: too many arguments

I edited the file to run with -x and here is the output:

$ hack/update-codegen.sh 
+ ROOT_PACKAGE=github.com/deislabs/smi-sdk-go
+ CUSTOM_RESOURCE_VERSION=v1alpha1
+ echo '###### Generating Traffic Split Client ######'
###### Generating Traffic Split Client ######
+ generate_client split
+++ dirname hack/update-codegen.sh
++ cd hack
++ pwd
+ SCRIPT_ROOT='/home/surajssd/go/src/github.com/deislabs/smi-sdk-go/hack
/home/surajssd/go/src/github.com/deislabs/smi-sdk-go/hack'
++ cd /home/surajssd/go/src/github.com/deislabs/smi-sdk-go/hack /home/surajssd/go/src/github.com/deislabs/smi-sdk-go/hack/..
hack/update-codegen.sh: line 16: cd: too many arguments
+ ROOT_DIR=
@surajssd
Copy link
Contributor Author

If this matters:

$ cat /etc/redhat-release 
Fedora release 28 (Twenty Eight)

I am guessing that this line puts the dir name twice in the variable

SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

stefanprodan added a commit that referenced this issue Mar 18, 2020
Fix: #12

Signed-off-by: stefanprodan <stefan.prodan@gmail.com>
stefanprodan added a commit that referenced this issue Mar 20, 2020
- fix: #12

Signed-off-by: stefanprodan <stefan.prodan@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant