forked from hashicorp/go-getter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This also adds documentation to the README! This modifies the subdir argument (after the `//` in any URL) to support globbing. Since the path after `//` is always resolved _after_ any downloader and decompressor finishes, we have the full filesystem paths local on disk. Therefore, we can glob the paths to support unknown subdirs. This is specifically done so we can support "unwrapping" archives that are known to be rooted with a parent directory but the directory name is unknown. This is common practice with tar.gz, tar.bz, etc. files. The following would now work: ``` http://example.com/my.tar.gz//* ``` This would unwrap the first directory. If there are multiple directories in the archive (specifically if multiple glob matches are found) then it is a download error. Existing tests pass, new tests added.
- Loading branch information
Showing
5 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Binary file not shown.
Binary file not shown.