diff --git a/rdebug.go b/rdebug.go index ab388b7..5b51c79 100644 --- a/rdebug.go +++ b/rdebug.go @@ -55,13 +55,13 @@ func main() { } defer connection.Close() - err = deployFile(connection, flag.Arg(1), path.Base(flag.Arg(1)), "0755") + err = deployFile(connection, flag.Arg(1), "/tmp/"+path.Base(flag.Arg(1)), "0755") if err != nil { fmt.Fprintf(os.Stderr, "Can't deploy file: %s", err.Error()) os.Exit(1) } - session, err := startGDB(connection, "./"+path.Base(flag.Arg(1))) + session, err := startGDB(connection, "/tmp/"+path.Base(flag.Arg(1))) if err != nil { fmt.Fprintf(os.Stderr, "Can't start gdb: %s", err.Error()) os.Exit(1) @@ -98,6 +98,8 @@ func startGDB(client *ssh.Client, remoteCommand string) (*ssh.Session, error) { } func deployFile(client *ssh.Client, localPath, remotePath string, permissions string) error { + fmt.Printf("Deploy: %s -> %s\n", localPath, remotePath) + reader, err := os.Open(localPath) if err != nil { return err