cyverse / gocommands

iRODS Command-line Tools written in Go
Other
29 stars 18 forks source link

Configurable home collection #28

Closed stsnel closed 6 months ago

stsnel commented 6 months ago

Hi Illyoung,

We are seeing that an increasing number of Yoda users are also starting to utilize GoCommands.

The GoCommands currently have a hardcoded setting for the user's home collection (/zoneName/home/userName). Yoda users don't always have a personal home collection, so this can cause commands that use this home collection as a default (e.g. gocmd cd without a collection parameter) to fail for some Yoda users.

iCommands supports overriding the home directory by setting the irods_home parameter in the irods_environment.json file. We use this feature to set the iCommands home collection to an existing collection (e.g. /zoneName/home). Is it okay to have the same behaviour in GoCommands?

If you like, I'd be happy to have a shot at providing a pull request for this.

iychoi commented 6 months ago

Hi @stsnel,

Of course, I am happy that GoCommands is getting more widely used.

The new commit a44b66c fixes the issue. It looks like the issue is fixed at least on my end, but I need more testing from actual users. Can you or someone else can test the new code? Because the new commit is not yet released, it should be compiled manually. It's simply type make to get done, though.

Thanks!

stsnel commented 6 months ago

Thanks so much! We will test it, and I expect to be able to share findings on Monday.

stsnel commented 6 months ago

Today I've tested the cd, ls and cp subcommands using absolute collection paths, paths relative to the current collection, and paths relative to the home collection. Everything works as expected, both when the home collection is defined in the environment file and when it isn't :+1: :rocket:

iychoi commented 6 months ago

Thank you for testing!