Skip to content

init replaces Dockerfile if it already exists #365

@dszlachta

Description

@dszlachta

If the project already has Dockerfile in the main directory, running dappnodesdk init will replace it without any warning. This can be a serious problem if the user is just quickly prototyping and they haven't call git init yet.

To Reproduce

  1. Install version 0.2.69
  2. In the terminal, do
cd /tmp
mkdir test && cd test
echo "Content" > Dockerfile # create the file
npx @dappnode/dappnodesdk init
cat Dockerfile # note the content is different

Expected behavior

Because init creates boilerplate Dockerfile, I guess it would be OK to simply skip this step if Dockerfile already exists

DAppNode version:

I don't think it matters here

Additional context

As always, DAppNode is awesome. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions