Skip to content

Commit e196920

Browse files
committed
fix: Output absolute paths for diffs
1 parent 4f03415 commit e196920

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cli/configssh.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ func configSSH() *cobra.Command {
250250
}
251251

252252
for _, diffFn := range []func() ([]byte, error){
253-
func() ([]byte, error) { return diffBytes(sshConfigFileOrig, configRaw, configModified) },
254-
func() ([]byte, error) { return diffBytes(coderConfigFileOrig, coderConfigRaw, buf.Bytes()) },
253+
func() ([]byte, error) { return diffBytes(sshConfigFile, configRaw, configModified) },
254+
func() ([]byte, error) { return diffBytes(coderConfigFile, coderConfigRaw, buf.Bytes()) },
255255
} {
256256
diff, err := diffFn()
257257
if err != nil {
@@ -399,8 +399,8 @@ func diffBytes(name string, b1, b2 []byte) ([]byte, error) {
399399
// Check if diff only output two lines, if yes, there's no diff.
400400
//
401401
// Example:
402-
// --- ~/.ssh/config
403-
// +++ ~/.ssh/config.new
402+
// --- /home/user/.ssh/config
403+
// +++ /home/user/.ssh/config.new
404404
if bytes.Count(b, []byte{'\n'}) == 2 {
405405
b = nil
406406
}

0 commit comments

Comments
 (0)