lib/pdk/generators/module.rb in pdk-0.4.1 vs lib/pdk/generators/module.rb in pdk-0.4.2
- old
+ new
@@ -52,10 +52,10 @@
FileUtils.mv(temp_target_dir, target_dir)
end
def self.username_from_login
- login = Etc.getlogin
+ login = Etc.getlogin || ''
login_clean = login.gsub(%r{[^0-9a-z]}i, '')
login_clean = 'username' if login_clean.empty?
if login_clean != login
PDK.logger.warn _('You username is not a valid Forge username, proceeding with the username %{username}') % {