Skip to content

Commit

Permalink
Merge pull request #41 from speakeasy-api/chase/windows-paths
Browse files Browse the repository at this point in the history
fix: local URL check for Windows
  • Loading branch information
chase-crumbaugh authored Jun 4, 2024
2 parents 1ac7e91 + 90466a2 commit 62ff50e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions workflow/common.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package workflow

import (
"errors"
"net/url"
"os"
"path/filepath"
Expand All @@ -21,7 +20,8 @@ func getFileStatus(filePath string) fileStatus {
if strings.Contains(filePath, "registry.speakeasyapi.dev") {
return fileStatusRegistry
}
if _, err := os.Stat(SanitizeFilePath(filePath)); err == nil || !errors.Is(err, os.ErrNotExist) {

if file, err := os.Stat(SanitizeFilePath(filePath)); err == nil || (file != nil && file.Size() > 0) {
return fileStatusLocal
}

Expand Down

0 comments on commit 62ff50e

Please sign in to comment.