Compare commits

..

No commits in common. "b2ef27761f12adcb1af877f4595c42d960055b11" and "77729cf653f1625cfa20fa59f644eb7323ee1373" have entirely different histories.

View File

@ -34,7 +34,7 @@ import (
"unlock-music.dev/cli/internal/utils"
)
var AppVersion = "v0.2.8"
var AppVersion = "v0.2.7"
var logger, _ = logging.NewZapLogger() // TODO: inject logger to application, instead of using global logger
@ -121,16 +121,13 @@ func appMain(c *cli.Context) (err error) {
return err
}
var inputDir string
if inputStat.IsDir() {
inputDir = input
} else {
inputDir = path.Dir(input)
}
if output == "" {
// Default to where the input dir is
output = inputDir
// Default to where the input is
if inputStat.IsDir() {
output = input
} else {
output = path.Dir(input)
}
}
outputStat, err := os.Stat(output)
@ -155,7 +152,7 @@ func appMain(c *cli.Context) (err error) {
}
proc := &processor{
inputDir: inputDir,
inputDir: input,
outputDir: output,
skipNoopDecoder: c.Bool("skip-noop"),
removeSource: c.Bool("remove-source"),