澄清一点,我不是在谈论我的行政凭据。我特别谈论数据库凭据。
如果我在终端中运行这样的脚本:
/usr/local/bin/psql -h my-db -U userName test -Atc 'SELECT id, title, internal_name FROM my.template WHERE my_id = 5'
......它运作正常。
但是在Applescript中:
set myInfo to do shell script ("/usr/local/bin/psql -h my-db -U userName test -Atc 'SELECT id, title, internal_name FROM my.template WHERE my_id = 5'")
...它吐出“psql:fe_sendauth:没有提供密码”
由于
答案 0 :(得分:0)
将其添加到shell脚本的开头:'PGPASSWORD = myPassword'