Skip to content

Avoid creating .clasp.json when a clone fails or overwrite the file every time #824

@everspader

Description

@everspader

(Note: Non-breaking issues are likely not to be prioritized. Please consider a PR in addition to your issue)

Expected Behavior

DO NOT create a .clasp.json file when a clasp clone command fails for some reason, for example, invalid ScriptID or login. This means that if the issue is fixed, and the clone is run again, it will fail because there's already a .clasp.json file in the directory.

Actual Behavior

A .clasp.json file is created whenever a clasp clone command is run regardless of the success or failure of the output.

Steps to Reproduce the Problem

  1. clasp login to any account
  2. clasp clone with a wrong ScriptID
  3. Fix the ScriptID
  4. clasp clone with the correct ScriptID

Specifications

  • Node version (node -v): 15.5.1
  • Version (clasp -v): 2.3.0
  • OS (Mac/Linux/Windows): Ubuntu 20.04

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