diff --git a/Casks/musescore.rb b/Casks/musescore.rb index 9cbb92cf3665..1a5644173283 100644 --- a/Casks/musescore.rb +++ b/Casks/musescore.rb @@ -10,4 +10,14 @@ depends_on macos: '>= :lion' app "MuseScore #{version.major}.app" + # shim script (https://github.com/caskroom/homebrew-cask/issues/18809) + shimscript = "#{staged_path}/mscore.wrapper.sh" + binary shimscript, target: 'mscore' + + preflight do + IO.write shimscript, <<~EOS + #!/bin/sh + exec '#{appdir}/MuseScore #{version.major}.app/Contents/MacOS/mscore' "$@" + EOS + end end