Coder Social home page Coder Social logo

Comments (8)

gedankenstuecke avatar gedankenstuecke commented on June 18, 2024 1

I have no strong opinions on this either way, but as the feature tries to emulate scp/rsync: In both you can do -r on single files I think, so allowing this here could lighten the mental load for users of osf-cli as the behaviour is identical?

from osfclient.

benlindsay avatar benlindsay commented on June 18, 2024 1

from osfclient.

betatim avatar betatim commented on June 18, 2024

The thinking with giving an error was that chances are the user made a mistake if they specified -r and a single file. You think it is worth protecting people from that or outweighed by utility of being able to do what you did?

(Why didn't you do osf upload -r .? Which I would have expected to work, if not that is a bug IMHO)

from osfclient.

benlindsay avatar benlindsay commented on June 18, 2024

In hindsight, osf upload -r . / would have worked fine, but I wanted some progress reporting, so the bash for loop was a hack to so I'd know which directory it got stuck on if there were errors (which there were, and which I posted under #74). I guess if progress reporting (ref #93) is working, there will be fewer cases where someone would intentionally use osf upload -r on a single file. The only case I can think of is in for loops similar to mine, which I could still see people using if they want to upload a subset of the files and directories in a given directory.

I do see your point though, that the -r with a single file could often mean someone didn't type the directory they actually wanted to upload. With that in mind, and with a -v option available in the future, I would be fine with this going either way.

from osfclient.

benlindsay avatar benlindsay commented on June 18, 2024

I have no strong opinions on this either way, but as the feature tries to emulate scp/rsync: In both you can do -r on single files I think, so allowing this here could lighten the mental load for users of osf-cli as the behaviour is identical?

I tend to agree with this, especially if the plan is to make recursive uploads more scp-like or rsync-like, i.e. by allowing upload of multiple files or directories in one command instead of just allowing upload of one file or the contents of one directory. If that's not the plan, then maybe there's not much reason to make osf upload emulate other features of rsync and scp?

from osfclient.

betatim avatar betatim commented on June 18, 2024

Should be a simple PR to remove the check and update the test. Go for it.

from osfclient.

betatim avatar betatim commented on June 18, 2024

@benlindsay or @gedankenstuecke are either of you guys interested in creating a PR for this?

from osfclient.

gedankenstuecke avatar gedankenstuecke commented on June 18, 2024

Interested: Yes
Having time: Nope 😢

Sorry, will have to pass on that one.

from osfclient.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.