Created
June 1, 2015 22:22
-
-
Save nicholasf/15ca71e8c46c7f32dbbe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//this following snippet | |
cmdStr := commandString(*psql, *host, *database, *user, *dir, sqlFile.filename) | |
_, err := exec.Command(cmdStr).Output() | |
if err != nil { | |
fmt.Println(err.Error()) | |
log.Fatal(err) | |
} | |
//is producing this output | |
fork/exec /usr/local/bin/psql -h localhost -d furd_development -f /Users/nicholasf/code/nicholasf/furd/services/users/migrations/01-create-users.sql: no such file or directory | |
pger: fork/exec /usr/local/bin/psql -h localhost -d furd_development -f /Users/nicholasf/code/nicholasf/furd/services/users/migrations/01-create-users.sql: no such file or directory | |
exit status 1 | |
//when I copy and paste the actual command output in my shell and run it, it works! | |
♪ migrations git:(master) ✗ /usr/local/bin/psql -h localhost -d furd_development -f /Users/nicholasf/code/nicholasf/furd/services/users/migrations/01-create-users.sql | |
CREATE TABLE | |
//hrm ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment