Use shared file section helpers in update-profile#1513
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
update_profile.sh's local marker-count and section-content temp-file comparison with sharedbase-bash-libsfile section helpers.file_section_existsandfile_section_needs_updateso older helper checkouts fail clearly.base-bash-libscommit424ef9fe61bc8a462ba9980ea63b38dd202ec242, which landed the companion helper PR.Companion helper PR: basefoundry/base-bash-libs#124.
Fixes #1492.
Validation
env BASE_BASH_LIBS_DIR=/Users/rameshhp/work/base-bash-libs/lib/bash bats --filter "shared file section helper" cli/bash/commands/basectl/tests/update-profile.batsfailed before implementation because the shared helper stubs were not called.env BASE_BASH_LIBS_DIR=/Users/rameshhp/work/base-bash-libs/lib/bash bats --filter "shared file section helper" cli/bash/commands/basectl/tests/update-profile.batsenv BASE_BASH_LIBS_DIR=/Users/rameshhp/work/base-bash-libs/lib/bash bats cli/bash/commands/basectl/tests/update-profile.batsbash -n cli/bash/commands/basectl/subcommands/update_profile.sh cli/bash/commands/basectl/tests/update-profile.batsshellcheck -S warning cli/bash/commands/basectl/subcommands/update_profile.sh cli/bash/commands/basectl/tests/update-profile.batsenv PYTHONPATH=lib/python:cli/python $HOME/.base.d/base/.venv/bin/python -m pytest tests/test_github_workflows.pygit diff --checkenv -u BASE_HOME BASE_BASH_LIBS_DIR=/Users/rameshhp/work/base-bash-libs/lib/bash BASE_CACHE_DIR=/private/tmp/base-pr-train-1492 ./bin/base-test