79 posts
Posted 22 July 2016 - 03:28 PM
Using shell.setPath() you can set the shell path to any value, including nil. Then when returning to the command line and typing in any character, the shell crashes with the error "string expected, got nil".
Reproduction:
Pass any variable except a string into shell.setPath(), then return to the shell command line and type any character.
218 posts
Location
tmpim
Posted 22 July 2016 - 11:16 PM
Using shell.setPath() you can set the shell path to any value, including nil. Then when returning to the command line and typing in any character, the shell crashes with the error "string expected, got nil".
Reproduction:
Pass any variable except a string into shell.setPath(), then return to the shell command line and type any character.
Not really a bug so much as something to keep in mind. It can be argued that shell.setPath
shouldn't do type checking. If you are worried about this you can either monkey patch it or type check yourself when using it.
79 posts
Posted 23 July 2016 - 09:26 PM
I wouldn't have considered it much of a problem if it wasn't for the fact it causes the shell to error and the computer to shutdown with only a short error message in between. It could be confusing for novice users if this happens and they can't work out why. That being said, you would expect someone using this to know vaguely what they are doing :)/> but this is why I put this up here, to bring it to people's atttention so Dan or someone with the power can decide…
218 posts
Location
tmpim
Posted 24 July 2016 - 12:34 AM
If that's the intention, I think this topic would be better in suggestions. But that's just my opinion.
Edited on 23 July 2016 - 10:34 PM