Fixes.
Fixed the WriteEnv usage and updated to allow for sudo if necessary.
This commit is contained in:
parent
77e2837ff0
commit
492ac956ca
1 changed files with 3 additions and 2 deletions
|
@ -11,10 +11,11 @@ type Modulus struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Modulus) Write(f *buildfile.Buildfile) {
|
func (m *Modulus) Write(f *buildfile.Buildfile) {
|
||||||
f.writeEnv("MODULUS_TOKEN", m.Token)
|
f.WriteEnv("MODULUS_TOKEN", m.Token)
|
||||||
|
|
||||||
// Install the Modulus command line interface then deploy the configured
|
// Install the Modulus command line interface then deploy the configured
|
||||||
// project.
|
// project.
|
||||||
f.WriteCmdSilent("npm install -g modulus")
|
f.WriteCmdSilent("[ -f /usr/bin/sudo ] || npm install -g modulus")
|
||||||
|
f.WriteCmdSilent("[ -f /usr/bin/sudo ] && sudo npm install -g modulus")
|
||||||
f.WriteCmd(fmt.Sprintf("modulus deploy -p '%s'", m.App))
|
f.WriteCmd(fmt.Sprintf("modulus deploy -p '%s'", m.App))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue