Giter Club home page Giter Club logo

Comments (9)

hpe-ykoehler avatar hpe-ykoehler commented on July 20, 2024 7

Even more confusing is the devcontainer build [path] which still require --workspace-folder, seems like a bug, either path or workspace-folder but not both please.

from cli.

samruddhikhandale avatar samruddhikhandale commented on July 20, 2024 3

Hi 👋

Thanks for all the suggestions, and growing interest on this issue. We agree that the cli should have --workspace-folder option as optional and should default to . (ie pwd). We should be able to pick this up soon.

from cli.

alexec avatar alexec commented on July 20, 2024 2

Having to type --workspace-folder . all the time is crazy annoying. Please default to $PWD.

from cli.

felipecrs avatar felipecrs commented on July 20, 2024 2

I'd suggest not to add the environment variable support unless someone asks.

from cli.

MunsMan avatar MunsMan commented on July 20, 2024 2

I added this function to my .zshrc, which does not solve the problem, but reduces the pain:

function dev() {
     devcontainer $1 --workspace-folder . ${@: 2}
 }

Now I can just call dev up or dev exec ls

Maybe it helps someone while the Issue exists.

from cli.

hpe-ykoehler avatar hpe-ykoehler commented on July 20, 2024

Having to type --workspace-folder . all the time is crazy annoying. Please default to $PWD.

And add support to specify using an ENV variable as well, DEVCONTAINER_WORKSPACE_FOLDER or whatever.

from cli.

alexec avatar alexec commented on July 20, 2024

I've created a PR for this.

from cli.

MunsMan avatar MunsMan commented on July 20, 2024

I've created a PR #425, with a basic check if a .devcontainer directory exists in your cwd. I would be pretty easy to add an ENV variable to it, by adding it to the findWorkspaceFolder Function.

@hpe-ykoehler Currently, I'm not convinced if an ENV variable is needed. Do you have a use case for that?

from cli.

hpe-ykoehler avatar hpe-ykoehler commented on July 20, 2024

@MunsMan no, but convention is that config option can be controlled by cli argument, env or config file in that order of priority. Agree env may appears less useful, but devcontainer should use a CLI framework that handles all those details (such as Cobra if written in Go) no?

from cli.

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.