Git Product home page Git Product logo

Comments (4)

delgermurun avatar delgermurun commented on May 24, 2024

@j-bennet Good catch! I like the idea to make things consistent.
Let's try to create directories if they don't exist.

Happy to receive a PR for it.

from litecli.

zmwangx avatar zmwangx commented on May 24, 2024

Just want to chime in: most *nix command line tools are happy to create nonexistent files (or new direct subdirectories, if creating a directory structure is the tool's goal), but balk at the idea of creating intermediate subdirectories, unless explicitly told to do so. litecli is designed to deal with a single file at a time, so I don't think it's in the business of creating directories.

As a reference point, when you give sqlite3 a non-existent path, it happily starts the shell; when you actually start making queries, it either creates the database file, or aborts with "unable to open database file" if the directory doesn't exist.

IMO it's okay for litecli to create the file immediately, but in the nonexistent directory case, a better error message saying so should be enough.

from litecli.

j-bennet avatar j-bennet commented on May 24, 2024

Good point. Perhaps this is too much responsibility for litecli to create directories.

This PR adds a more clear error message for this case:

#46

from litecli.

delgermurun avatar delgermurun commented on May 24, 2024

Fixed with #46

from litecli.

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.