Fixes for #95 and #96 (caused by accident in #81) and other bugs#99
Merged
jwerle merged 6 commits intobpkg:masterfrom Feb 2, 2018
Merged
Fixes for #95 and #96 (caused by accident in #81) and other bugs#99jwerle merged 6 commits intobpkg:masterfrom
jwerle merged 6 commits intobpkg:masterfrom
Conversation
The bug occurred if a save-path did not exists. The function now attempts to create the directory before trying to save a file to it.
Bug was caused by incorrect placement of quoute character, causing the result of a check to be incorrect.
The bug occurred when scripts were not in the root of the package. Also cleans up the download logic for the files section.
The bug occurred when a "global" section was present in a `packages.json` file but had a value other than "true". Due to the logic of the check, such a package would then be marked for global install.
This was referenced Jan 19, 2018
jwerle
approved these changes
Feb 2, 2018
Member
|
👍 |
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.
This PR fixes #95 and #96, which were unfortunately caused by changes from the cleanup in #81.
Other bug-fixes
I also encountered other bugs, fixes are included:
save_remote_filefunction inbpkg-installthat occurred if a save-path did not exists. The function now attempts to create the directory before trying to save a file to it. This fix allows for nestedfilesandscriptentries frompackage.jsonto be properly downloaded.bpkg-installglobal check. Even before my accidental breakage in Issues 78 - Makesinstall.shmore shellcheck compliant. #81, the check was broken. The bug occurred when a "global" section was present in apackages.jsonfile but had a value other thantrue. Due to the logic of the check, such a package would then be marked for global install.bpkg-installscripts download that occurred when scripts were not in the root of the package. The Github '404' text file was then downloaded.Other changes
bpkg-install. The was code that claimed to make## comma to spacebut the output of the JSON does not contain any commas.bpkg-installclarifying sub-dependencies are being installed.Final points of concern
When reviewing the changes from #81, I came across an edit that changes
IFS="|"toIFS="'|'". This looks like a mistake which could also spell trouble...As I feel horrible for introducing these bugs, I think it might be wise to redirect any effort purely into creating tests for
bpkgbefore any other efforts are made.The validation logic I used to check the working of each version of the code (pre-breakage, post-breakage, fixed) can be found here: https://gist.github.com/Potherca/d9b5817de94a45fff6ed698c799b08f3