Skip to content

Commit b6e87fa

Browse files
facchinmmasci
authored andcommitted
Correctly handle sketch.FullPath during export (#136)
1 parent 967fc39 commit b6e87fa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: commands/compile/compile.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,11 @@ func Compile(ctx context.Context, req *rpc.CompileReq, outStream io.Writer, errS
181181
var exportPath *paths.Path
182182
var exportFile string
183183
if req.GetExportFile() == "" {
184-
exportPath = sketch.FullPath
184+
if sketch.FullPath.IsDir() {
185+
exportPath = sketch.FullPath
186+
} else {
187+
exportPath = sketch.FullPath.Parent()
188+
}
185189
exportFile = sketch.Name + "." + fqbnSuffix
186190
} else {
187191
exportPath = paths.New(req.GetExportFile()).Parent()

0 commit comments

Comments
 (0)