Skip to content

Commit d86ac8e

Browse files
committed
Fix publish for Windows
1 parent 796cdc7 commit d86ac8e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd_publish.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ var publishCmd = &cobra.Command{
3636
optionalFiles := []string{"README.md", "package-lock.json"}
3737
requiredFiles := []string{"package.json", "build/index.js"}
3838
for _, name := range optionalFiles {
39-
selected[filepath.Clean(name)] = true
39+
selected[filepath.ToSlash(filepath.Clean(name))] = true
4040
}
4141

4242
for _, name := range requiredFiles {
43-
selected[filepath.Clean(name)] = true
43+
selected[filepath.ToSlash(filepath.Clean(name))] = true
4444
_, err := os.Stat(filepath.Join(pluginDir, name))
4545
if err != nil {
4646
pterm.Warning.Printf("Missing required file: %s\n", name)
@@ -70,7 +70,7 @@ var publishCmd = &cobra.Command{
7070
return err
7171
}
7272

73-
relPath = filepath.ToSlash(relPath) // Normalize for zip entries
73+
relPath = filepath.ToSlash(filepath.Clean(relPath)) // Normalize for zip entries
7474

7575
if !selected[relPath] {
7676
return nil

0 commit comments

Comments
 (0)