Permalink
Browse files

Fixed foldername bug.

  • Loading branch information...
1 parent 9310675 commit cb99d0bb44f7195faf9d74b074ae9a9aa7f59b09 @winston winston committed Dec 21, 2012
Showing with 8 additions and 7 deletions.
  1. +8 −7 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

0 comments on commit cb99d0b

Please sign in to comment.