-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
The --secret option effectively escapes out of most project configuration options, but schema command initialization always requires a project.
fauna-shell/src/lib/schema-command.ts
Lines 33 to 57 in 1c5153c
| async init() { | |
| await super.init(); | |
| if (this.flags?.dir !== undefined) { | |
| this.dir = this.flags.dir; | |
| } else if (this.shellConfig?.projectPath !== undefined) { | |
| if (this.shellConfig.projectConfig?.schemaDir !== undefined) { | |
| this.dir = path.join( | |
| this.shellConfig.projectPath, | |
| this.shellConfig.projectConfig.schemaDir | |
| ); | |
| } else { | |
| this.dir = this.shellConfig.projectPath; | |
| } | |
| if (!dirExists(this.dir)) { | |
| this.error(`The project fsl directory: ${this.dir} does not exist.`); | |
| } else if (!dirIsWriteable(this.dir)) { | |
| this.error(`The project fsl directory: ${this.dir} is not writeable.`); | |
| } | |
| } else { | |
| this.error( | |
| "No project found. Create a project with `fauna project init`." | |
| ); | |
| } | |
| } |
When --secret is used with schema commit, and schema abandon commands, we should not require a project configuration.
Workarounds in the meantime
You can, of course, create a dummy project, but that's a lot of work.
you can add a dummy directory `--dir .' for example:
fauna schema abandon --secret xxxxxxxx --dir .fabiotheo
Metadata
Metadata
Assignees
Labels
No labels