Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed foldername bug.

  • Loading branch information...
commit cb99d0bb44f7195faf9d74b074ae9a9aa7f59b09 1 parent 9310675
@winston winston authored
Showing with 8 additions and 7 deletions.
  1. +8 −7 recipes/set_finder_show_user_home_in_sidebar.rb
View
15 recipes/set_finder_show_user_home_in_sidebar.rb
@@ -1,15 +1,16 @@
ruby_block "Show User Home In Sidebar" do
+ username = ENV['SUDO_USER']
block do
system(
"osascript -e '
tell application \"Finder\"
- activate
- delay 1
- set user_home to folder \"nctx\" of folder \"Users\" of Startup disk
- select user_home
- delay 1
- tell application \"System Events\" to tell process \"Finder\" to keystroke \"t\" using command down
- close window 1
+ activate
+ delay 1
+ set user_home to folder \"#{username}\" of folder \"Users\" of Startup disk
+ select user_home
+ delay 1
+ tell application \"System Events\" to tell process \"Finder\" to keystroke \"t\" using command down
+ close window 1
end tell'"
)
end
Please sign in to comment.
Something went wrong with that request. Please try again.