mirror of
https://git.unlock-music.dev/um/cli.git
synced 2025-12-06 14:07:23 +00:00
Compare commits
No commits in common. "72ace9fc62a42880689e65eee877580fb152b18b" and "2bfb5ffddfa004fa6e6967845b3825ab856b1291" have entirely different histories.
72ace9fc62
...
2bfb5ffddf
@ -12,6 +12,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
@ -31,7 +32,7 @@ import (
|
|||||||
"unlock-music.dev/cli/internal/utils"
|
"unlock-music.dev/cli/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
var AppVersion = "v0.2.11"
|
var AppVersion = "v0.2.10"
|
||||||
|
|
||||||
var logger = setupLogger(false) // TODO: inject logger to application, instead of using global logger
|
var logger = setupLogger(false) // TODO: inject logger to application, instead of using global logger
|
||||||
|
|
||||||
@ -149,7 +150,7 @@ func appMain(c *cli.Context) (err error) {
|
|||||||
if inputStat.IsDir() {
|
if inputStat.IsDir() {
|
||||||
inputDir = input
|
inputDir = input
|
||||||
} else {
|
} else {
|
||||||
inputDir = filepath.Dir(input)
|
inputDir = path.Dir(input)
|
||||||
}
|
}
|
||||||
inputDir, absErr = filepath.Abs(inputDir)
|
inputDir, absErr = filepath.Abs(inputDir)
|
||||||
if absErr != nil {
|
if absErr != nil {
|
||||||
@ -160,7 +161,6 @@ func appMain(c *cli.Context) (err error) {
|
|||||||
// Default to where the input dir is
|
// Default to where the input dir is
|
||||||
output = inputDir
|
output = inputDir
|
||||||
}
|
}
|
||||||
logger.Debug("resolve input/output path", zap.String("inputDir", inputDir), zap.String("input", input), zap.String("output", output))
|
|
||||||
|
|
||||||
outputStat, err := os.Stat(output)
|
outputStat, err := os.Stat(output)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -299,8 +299,6 @@ func (p *processor) processDir(inputDir string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *processor) processFile(filePath string) error {
|
func (p *processor) processFile(filePath string) error {
|
||||||
p.logger.Debug("processFile", zap.String("file", filePath), zap.String("inputDir", p.inputDir))
|
|
||||||
|
|
||||||
allDec := common.GetDecoder(filePath, p.skipNoopDecoder)
|
allDec := common.GetDecoder(filePath, p.skipNoopDecoder)
|
||||||
if len(allDec) == 0 {
|
if len(allDec) == 0 {
|
||||||
return errors.New("skipping while no suitable decoder")
|
return errors.New("skipping while no suitable decoder")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user