Skip to content

Commit 47615c3

Browse files
committed
fix: explicitly check schemas
1 parent ef7f8cc commit 47615c3

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

cli/disk/main.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ func FromPath(path string) (Disk, error) {
3131
return nil, errors.Wrap(err, "failed to parse path")
3232
}
3333

34-
log.Info().Msg(path)
35-
log.Info().Msg(parsed.Scheme)
3634
switch parsed.Scheme {
3735
case "ftp":
3836
log.Info().Str("path", path).Msg("connecting to ftp")

cli/installations.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func (i *Installations) AddInstallation(ctx *GlobalContext, installPath string,
116116
}
117117

118118
var absolutePath = installPath
119-
if parsed.Scheme == "" {
119+
if parsed.Scheme != "ftp" && parsed.Scheme != "sftp" {
120120
absolutePath, err = filepath.Abs(installPath)
121121

122122
if err != nil {
@@ -129,11 +129,6 @@ func (i *Installations) AddInstallation(ctx *GlobalContext, installPath string,
129129
Profile: profile,
130130
}
131131

132-
// ftp://one:1234@localhost:21/
133-
134-
log.Info().Msg("installPath: " + installPath)
135-
log.Info().Msg("absolutePath: " + absolutePath)
136-
137132
if err := installation.Validate(ctx); err != nil {
138133
return nil, errors.Wrap(err, "failed to validate installation")
139134
}

0 commit comments

Comments
 (0)