I would like a Rake task to export the path to my command line tool to $PATH, and so I have the following line in my Rakefile:
task :make_path do
sh 'export PATH=$HOME/Desktop/folder:$PATH'
end
When putting that line export PATH=$HOME/Desktop/folder:$PATH
into the terminal directly, the path is prepended to my $PATH variable. However if I run rake make_path
nothing changes. Why?
The following task correctly adds execute permission to my command line tool file:
task :chmod do
sh 'chmod +x my_file'
end