Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 988e21e

Browse files
committed
fixup! Handle single file sync
1 parent 3e7c4da commit 988e21e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/cmd/sync.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ func makeRunSync(init *bool) func(cmd *cobra.Command, args []string) error {
7575
if err != nil {
7676
return err
7777
}
78-
if !info.IsDir() {
78+
if info.Mode().IsRegular() {
7979
return sync.SingleFile(ctx, local, remoteDir, env, client)
80+
} else if !info.IsDir() {
81+
return xerrors.Errorf("local path must lead to a regular file or directory: %w", err)
8082
}
8183

8284
absLocal, err := filepath.Abs(local)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy