Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for macOS 13 #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions icons.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const (

// Ready-to-use icons based on macOS system icons. These icons are all found in
//
// /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources
// /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources
//
// The icons are the same as found in the Alfred-Workflow library
// for Python. Preview them here:
Expand Down Expand Up @@ -54,7 +54,7 @@ var (
IconSync = &Icon{Value: sysIcons + "Sync.icns"}
IconTrash = &Icon{Value: sysIcons + "TrashIcon.icns"}
IconUser = &Icon{Value: sysIcons + "UserIcon.icns"}
IconWarning = &Icon{Value: sysIcons + "AlertCautionIcon.icns"}
IconWarning = &Icon{Value: sysIcons + "AlertCautionBadgeIcon.icns"}
IconWeb = &Icon{Value: sysIcons + "BookmarkIcon.icns"}
)

Expand All @@ -70,7 +70,7 @@ var (
// Type = IconTypeFileIcon will treat Value as the path to a file or
// directory and use that file's icon, e.g:
//
// icon := &aw.Icon{"/Applications/Mail.app", aw.IconTypeFileIcon}
// icon := &aw.Icon{"/Applications/Mail.app", aw.IconTypeFileIcon}
//
// will display Mail.app's icon.
//
Expand All @@ -81,7 +81,7 @@ var (
// You can find out the UTI of a filetype by dragging one of the files
// to a File Filter's File Types list in Alfred, or in a shell with:
//
// mdls -name kMDItemContentType -raw /path/to/the/file
// mdls -name kMDItemContentType -raw /path/to/the/file
//
// This will only work on Spotlight-indexed files.
type Icon struct {
Expand Down
2 changes: 1 addition & 1 deletion util/scripts.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var (
// Used by the Script Runner (and by extension Run()) to determine
// how to run files that aren't executable.
DefaultInterpreters = map[string][]string{
".py": {"/usr/bin/python"},
".py": {"/usr/bin/python3"},
".rb": {"/usr/bin/ruby"},
".sh": {"/bin/bash"},
".zsh": {"/bin/zsh"},
Expand Down
3 changes: 2 additions & 1 deletion util/scripts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ func TestExecutableRunner(t *testing.T) {
{"/", false},
{"/bin", false},
// Existing paths
{"/usr/bin/python2.7", true}, // symlink on El Cap
{"/usr/bin/python2.7", false}, // Missing since macOS 12.3
{"/usr/bin/python3", true}, // Only included python since macOS 12.3
{"/bin/cp", true},
{"/bin/ls", true},
{"/bin/mv", true},
Expand Down
2 changes: 1 addition & 1 deletion util/testdata/pythonx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python3

import sys

Expand Down
2 changes: 1 addition & 1 deletion workflow_feedback_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestItemHelpers(t *testing.T) {
)

it := wf.NewWarningItem("Warn Title", "Warn subtitle")
x := `{"title":"Warn Title","subtitle":"Warn subtitle","valid":false,"icon":{"path":"/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertCautionIcon.icns"}}`
x := `{"title":"Warn Title","subtitle":"Warn subtitle","valid":false,"icon":{"path":"/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertCautionBadgeIcon.icns"}}`
data, err = json.Marshal(it)
assert.Nil(t, err, "marshal Item failed")
js := string(data)
Expand Down
2 changes: 1 addition & 1 deletion workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ func ExampleWorkflow_Warn() {
// "subtitle": "Those items are boring",
// "valid": false,
// "icon": {
// "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertCautionIcon.icns"
// "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertCautionBadgeIcon.icns"
// }
// }
// ]
Expand Down