简体   繁体   中英

Strange error running osascript -e [command] on macOS Mojave

I've just done a clean install of macOS Mojave (albeit various bits and pieces reinstalled) and getting a strange error running a bash script which in turn runs AppleScript via osascript . Any command passed to osascript -e seems to produce the same error, even though the actual command appears to complete.

eg $ osascript -e 'say "hello"'

Error is:

2018-12-03 22:35:26.301 osascript[39652:590470] isPrefsCreateCacheFromEnabledAndDefaultInputSources - can't find anything from GetInputSourceEnabledPrefs, use defaultASCIIKeyLayoutDict = {type = mutable dict, count = 3,
entries =>
0 : {contents = "InputSourceKind"} = {contents = "Keyboard Layout"}
1 : {contents = "KeyboardLayout ID"} = {value = +2, type = kCFNumberSInt64Type}
9 : {contents = "KeyboardLayout Name"} = British
}

Running the same command via the ScriptEditor application works fine.

Using system bash, one keyboard configured at install (British).

Anyone have the same issue or idea what the problem is?

The issue went away when I added an extra keyboard via System Preferences > Keyboard > Input Sources. (Australian if anyone is interested.)

The issue stayed away after removing the extra keyboard. (I sporadically need the £.)

Report logged with Apple.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM