Skip to content

Commit

Permalink
Merge pull request #72 from gSchool/fix-yaml-split
Browse files Browse the repository at this point in the history
use path separator when reading config
  • Loading branch information
pgrunde authored Apr 7, 2021
2 parents 6c767c8 + c2c892c commit fb8f977
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/cmd/preview.go
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ func compressDirectory(source, target string, configYamlPaths []string) error {

fileIsIncluded := false
for _, p := range configYamlPaths {
var configPathSplits = strings.Split(p, "/")
var configPathSplits = strings.Split(p, string(os.PathSeparator))
var fileName = configPathSplits[len(configPathSplits)-1]
if strings.Contains(path, fileName) {
fileIsIncluded = true
Expand Down Expand Up @@ -764,7 +764,7 @@ func compressDirectory(source, target string, configYamlPaths []string) error {
// Check if the file we are iterating is a directory and update the header.Name
// or the header.Method appropriately
if info.IsDir() {
header.Name += "/"
header.Name += string(os.PathSeparator)
} else {
header.Method = zip.Deflate
}
Expand Down
2 changes: 1 addition & 1 deletion app/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You can get your api token at https://learn-2.galvanize.com/api_token
`

// currentReleaseVersion is used to print the version the user currently has downloaded
const currentReleaseVersion = "v0.8.14"
const currentReleaseVersion = "v0.8.15"

// rootCmd is the base for all our commands. It currently just checks for all the
// necessary credentials and prompts the user to set them if they are not there.
Expand Down

0 comments on commit fb8f977

Please sign in to comment.