Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call the scripts instead of sourcing them #31

Merged
merged 1 commit into from
Nov 7, 2023
Merged

Conversation

kfcampbell
Copy link
Member

Sourcing the scripts will load functionality from them but not execute it. This small update causes the install-tools.sh script's code to be executed. Another way to do this would be to refactor the script to export a function and then call that function in each parent script; I've elected to go this way because it's fewer lines but I'm happy to change that as desired.

On this branch:

 sh$ ./scripts/generate-go.sh
The correct version (1.8.1) of microsoft.openapi.kiota is installed...skipping install step
+ go run schemas/main.go --schema-next=false
2023/11/07 11:00:00 Downloading latest schema from descriptions directory

On main:

 sh$ ./scripts/generate-go.sh
./scripts/generate-go.sh: 10: source: not found
+ go run schemas/main.go --schema-next=false

I'm not sure why my environment is unable to recognize source.

@kfcampbell kfcampbell marked this pull request as ready for review November 7, 2023 19:01
@kfcampbell kfcampbell changed the title Call the scripts instead of merely sourcing them Call the scripts instead of sourcing them Nov 7, 2023
@kfcampbell kfcampbell requested a review from nickfloyd November 7, 2023 19:01
Copy link
Collaborator

@nickfloyd nickfloyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh great catch! ❤️

@kfcampbell kfcampbell merged commit b9fd52e into main Nov 7, 2023
@kfcampbell kfcampbell deleted the install-tools-fix branch November 7, 2023 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants