junegunn commented on PR #8052:
URL: https://github.com/apache/hbase/pull/8052#issuecomment-4273745278
Okay, now I see the point. While I can't imagine an HBase shell user relying
on `RUBYLIB`, it is probable that they bundle some scripts in a jar file and
add it to the CLASSPATH like so:
```sh
mkdir -p /tmp/scripts
echo 'puts 12345' > /tmp/scripts/demo.rb
jar -cf scripts.jar -C /tmp scripts/
bin/hbase shell -n scripts/demo.rb
# ERROR LoadError: no such file to load -- scripts/demo.rb
HBASE_CLASSPATH=scripts.jar bin/hbase shell -n scripts/demo.rb
# hbase:001:0> puts 12345
# 12345
# Without fix
HBASE_CLASSPATH=scripts.jar bin/hbase shell -n scripts/demo.rb
# NoMethodError: undefined method `workspace' for
#<Shell::Shell:0x62732be7>
# Did you mean? get_workspace
```
The patch fixes the problem and it works as expected. Approved.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]