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

When creating a symbolic link JRuby give bad error message when not an admin on windows #4765

Closed
cshupp1 opened this issue Aug 30, 2017 · 0 comments

Comments

@cshupp1
Copy link

cshupp1 commented Aug 30, 2017

This issue is closely related to issue:
#4669

On today's build (and many previous release versions) when making a symlink in a non admin shell you get a poor error message. Consider:

>  java -jar C:\work\va-ctt\jruby\jruby\maven\jruby-complete\target\jruby-complete-9.1.13.0-SNAPSHOT.jar -S jirb                         
irb(main):001:0> File.symlink('c:\temp\del.me', 'c:\temp\del2.me')                                                                       
SystemCallError: Unknown error (SystemCallError) 1314 - CreateSymbolicLink                                                               
        from uri:classloader:/jruby/kernel/file.rb:115:in `symlink'                                                                      
        from (irb):1:in `<eval>'                                                                                                         
        from org/jruby/RubyKernel.java:1000:in `eval'                                                                                    
        from org/jruby/RubyKernel.java:1298:in `loop'                                                                                    
        from org/jruby/RubyKernel.java:1120:in `catch'                                                                                   
        from org/jruby/RubyKernel.java:1120:in `catch'                                                                                   
        from uri:classloader:/META-INF/jruby.home/bin/jirb:13:in `<main>'                                                                

MRI ruby will give:

irb(main):003:0> File.symlink('c:\temp\del.me', 'c:\temp\del2.me')
Errno::EACCES: Permission denied @ rb_file_s_symlink - (c:\temp\del.me, c:\temp\del2.me)
        from (irb):3:in `symlink'
        from (irb):3
        from c:/languages/ruby/Ruby24-x64/bin/irb.cmd:19:in `<main>'

React on Rails makes use of these APIs and it would be nice to get a useful error message in the build to clue the developer in to run the build as an admin.

Thanks,
Cris

@enebo enebo added this to the JRuby 9.1.13.0 milestone Aug 30, 2017
enebo added a commit that referenced this issue Aug 30, 2017
@enebo enebo closed this as completed in 95f6a36 Aug 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants