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

Use more idiomatic bash #338

Merged
merged 8 commits into from
Feb 7, 2024
Merged

Use more idiomatic bash #338

merged 8 commits into from
Feb 7, 2024

Conversation

FabijanC
Copy link
Contributor

@FabijanC FabijanC commented Feb 7, 2024

Usage related changes

  • None

Development related changes

  • Use more idiomatic bash approach
  • Reduce script complexity
  • Apply formatting in a couple of files
    • using VS Code extensions: Bash IDE and Even Better TOML
  • Machete: ignore unused cairo-lang dependencies

Checklist:

  • Applied formatting - ./scripts/format.sh
  • No linter errors - ./scripts/clippy_check.sh
  • No unused dependencies - ./scripts/check_unused_deps.sh
  • Performed code self-review
  • Rebased to the last commit of the target branch (or merged it into my branch)
  • Documented the changes
  • Linked the issues which this PR resolves
  • Checked the TODO section in README.md if this PR resolves it
  • Updated the tests
  • All tests are passing - cargo test

Copy link
Contributor

@marioiordanov marioiordanov left a comment

Choose a reason for hiding this comment

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

how the quotes solve the problem for missing argument in the create_and_push_manifest function, when passed "" as seed_prefix

@FabijanC
Copy link
Contributor Author

FabijanC commented Feb 7, 2024

how the quotes solve the problem for missing argument in the create_and_push_manifest function, when passed "" as seed_prefix

That's how function argument parsing works in bash, I guess. Here's a minimum reproducible example:

set -eu

function foo() {
    echo $1
}

var=""
foo "$var"

Try removing the quotes in foo "$var" and see how it fails

@FabijanC FabijanC merged commit 1dc8bfe into main Feb 7, 2024
@FabijanC FabijanC deleted the bash-publish-refactor branch February 7, 2024 12:28
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.

None yet

2 participants