.profile confusion #40

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@Nitrodist

Fixed a bug where if you tried to start the game with your operating system's '.profile' file (used for initializing your terminal's settings) that it would error out by trying to load that file instead of the proper '.profile' in the ruby-warrior's data directory.

The fix is it won't load the file if your $HOME directory is the same as the directory you're running ruby-warrior from.

@Nitrodist Nitrodist Fixed a bug where if you tried to start the game with your operating …
…system's '.profile' file (used for initializing your terminal's settings) that it would error out by trying to load that file instead of the proper '.profile' in the ruby-warrior's data directory.

The fix is it won't load the file if your $HOME directory is the same as the directory you're running ruby-warrior from.
d4280d4
@ryanb
Owner

Do we know if this will cause any conflicts with Windows?

To my knowledge, .profile isn't a standard Windows file. I don't think there could be a conflict. That said, I am not 100% sure.

Writing to .profile should be fine. In Windows, ENV["HOME"] returns nil unless specifically set, so the updated condition will be true even if the "$HOME directory is the same as the directory you're running ruby-warrior from". No big deal though, because Windows don't use .profile file.

However, I don't like this patch. I'd rather changed default config file to something like ~/.rw_profile or even ~/.ruby-warrior/profile. Besides configuration, the ~/.ruby-warrior directory could eventually contain data for custom towers, etc.

I agree, change the name of the .profile file.

@Nitrodist Nitrodist closed this Jan 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment