-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplified config, config is now either default config or in project.…
… We can add support for config in home directory later if needed, but this unifies a lot of different but similar calls in the ConfigManager.
- Loading branch information
1 parent
adb05d5
commit c19aad7
Showing
9 changed files
with
108 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
import { stopContainer } from './utils'; | ||
import { stopContainer, eosIsReady } from './utils'; | ||
import { ConfigManager } from '../configManager'; | ||
|
||
/** | ||
* Stops the current Lamington docker container | ||
* @author Kevin Brown <github.com/thekevinbrown> | ||
*/ | ||
stopContainer() | ||
.then(() => console.log('Lamington container stopped.')) | ||
.catch(error => { | ||
console.log(); | ||
console.log('Could not stop container. Is it running?'); | ||
console.log(); | ||
console.log('Error from docker:'); | ||
console.error(error); | ||
const run = async () => { | ||
if (!(await ConfigManager.configExists())) { | ||
console.log('Project has not yet been initialised.'); | ||
console.log('Please run lamington init before running this command.'); | ||
|
||
process.exit(2); | ||
}); | ||
process.exit(1); | ||
} | ||
|
||
if (!(await eosIsReady())) { | ||
console.log(`Can't stop the container as EOS is already not running.`); | ||
|
||
process.exit(1); | ||
} | ||
|
||
await stopContainer(); | ||
}; | ||
|
||
run().catch(error => { | ||
process.exitCode = 1; | ||
console.log(error); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters