Getting a permission denied error on my .bash_profile
Thanks for building this!
I'm getting the following error when trying to run ./shellprof ~/.bash_profile. I'm using the correct user - and although I've looked at the script I'm hesitant to play with sudo here.
PermissionError: [Errno 13] Permission denied: '/Users/me/.bash_profile'
It's likely that ~/.bash_profile isn't executable. The way it's supposed to be run is by having bash read it in its own context.
You could try this:
./shellprof bash -c '. ~/.bash_profile'
Let me know if this helps!
@walles thanks so much! You're right - that caused the permissions error. The only issue now is that it's profiling the entire script at once:
Timings for printed lines: 6.69s: <<<PROGRAM START>>>
shellprof will tell you which printouts were on screen for how long.
So it will not profile lines of code, just lines of printout.
This should probably be emphasized more in the README.
What you could do as a workaround while profiling your startup script is adding echo lines to it, which you then remove after profiling is done.