Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with using installer (error: undefined method `[]' for nil:NilClass.) #138

Closed
marklonquist opened this issue Sep 13, 2017 · 8 comments
Labels

Comments

@marklonquist
Copy link

PS C:\Windows\system32> u3d install 2017.1.0f3 -p Unity,Android,Windows --trace
Root privileges are required
Unity is already downloaded
Android is already downloaded
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/u3d-1.0.3/lib/u3d/downloader.rb:167:in `destination_for': undefined method `[]' for nil:NilClass (NoMethodError)
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/u3d-1.0.3/lib/u3d/downloader.rb:98:in `get_package'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/u3d-1.0.3/lib/u3d/downloader.rb:52:in `block in download_modules'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/u3d-1.0.3/lib/u3d/downloader.rb:51:in `each'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/u3d-1.0.3/lib/u3d/downloader.rb:51:in `download_modules'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/u3d-1.0.3/lib/u3d/downloader.rb:40:in `fetch_modules'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/u3d-1.0.3/lib/u3d/commands.rb:132:in `install'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/u3d-1.0.3/lib/u3d/commands_generator.rb:147:in `block (2 levels) in run'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/commander-4.4.3/lib/commander/command.rb:178:in `call'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/commander-4.4.3/lib/commander/command.rb:153:in `run'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/commander-4.4.3/lib/commander/runner.rb:446:in `run_active_command'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/commander-4.4.3/lib/commander/runner.rb:68:in `run!'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/commander-4.4.3/lib/commander/delegates.rb:15:in `run!'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/u3d-1.0.3/lib/u3d/commands_generator.rb:195:in `run'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/u3d-1.0.3/lib/u3d/commands_generator.rb:37:in `start'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/u3d-1.0.3/exe/u3d:7:in `<top (required)>'
        from C:/Ruby24-x64/bin/u3d:22:in `load'
        from C:/Ruby24-x64/bin/u3d:22:in `<main>'
PS C:\Windows\system32>
@marklonquist
Copy link
Author

Seems this could because I'm running it on a windows machine.. Should perhaps not throw an error because of this, and just skip it?

@lacostej
Copy link
Member

Maybe because Windows isn't a package available on Windows. We should filter them out before trying to install. Thanks for the bug report!

@lacostej lacostej added the bug label Sep 13, 2017
lacostej added a commit to lacostej/u3d that referenced this issue Sep 13, 2017
@lacostej
Copy link
Member

@marklonquist I made it so that it fails. As it's the same mechanism that will catch someone asking to install package Lniux instead of Linux, I preferred to make it fail hard for now, in an explicit manner. We could consider making it ignore unknown modules, but I think it might hide user mistakes unnecessarily. WDYT?

lacostej added a commit to lacostej/u3d that referenced this issue Sep 13, 2017
@marklonquist
Copy link
Author

@lacostej the hard fail is great, as it gives a reason to what the issue is.. Perhaps also add a "-skip-modules" argument (you may be able to think of a better work)? Just a suggestion :-)

@lacostej
Copy link
Member

@marklonquist I am not sure I understand how you want the -skip-modules to work?

u3d already has the ability to install just the core (except on Linux where it doesn't install modules).

Or did you mean something like -skip-non-existing-modules? If so, out of curiosity, how would you use it? I am asking because in my head, if you specify the wrong module name, then you are probably not doing what you intended to do. So if we add an option so that u3d doesn't fail, the user might get the wrong impression that things worked, while it didn't. It might make you lose more time than correcting your argument line.

@marklonquist
Copy link
Author

It was just a quick thought :-) But yea, it was the "-skip-non-existing-modules" variant I was looking for, but no, it's not really needed. So the hard fail is exactly what was needed I'd guess.

@lacostej
Copy link
Member

Cool. Feedback really appreciated.

Note: you're our first external bug reporter on github. Achievement unlocked! ;)

@marklonquist
Copy link
Author

Glad I could help :) You can close this whenever you believe it's completely done.

lacostej added a commit that referenced this issue Sep 14, 2017
u3d/installer: hard fail if we ask for a non existant package (Related to #138)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants