Skip to content

Commit

Permalink
Add nvm version lock/set
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomationD committed Aug 8, 2024
1 parent d676a58 commit 7d1665b
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions internal/manager/serverless/native.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ func (sls *Manager) readNvmrc() error {
}

func (sls *Manager) runNvm(w io.Writer) error {
nvmDir := os.Getenv("NVM_DIR")
if len(nvmDir) == 0 {
nvmDir = "$HOME/.nvm"
nvmDir, err := sls.installNvm()
if err != nil {
return err
}

err := sls.readNvmrc()
err = sls.readNvmrc()
if err != nil {
return err
}
Expand Down Expand Up @@ -139,9 +139,9 @@ func (sls *Manager) runNvm(w io.Writer) error {
}

func (sls *Manager) runDeploy(w io.Writer) error {
nvmDir := os.Getenv("NVM_DIR")
if len(nvmDir) == 0 {
nvmDir = "$HOME/.nvm"
nvmDir, err := sls.installNvm()
if err != nil {
return err
}
var command string

Expand Down Expand Up @@ -213,9 +213,9 @@ func (sls *Manager) runDeploy(w io.Writer) error {

func (sls *Manager) runRemove(w io.Writer) error {

nvmDir := os.Getenv("NVM_DIR")
if len(nvmDir) == 0 {
nvmDir = "$HOME/.nvm"
nvmDir, err := sls.installNvm()
if err != nil {
return err
}

var command string
Expand Down Expand Up @@ -282,9 +282,9 @@ func (sls *Manager) runRemove(w io.Writer) error {
}

func (sls *Manager) runCreateDomain(w io.Writer) error {
nvmDir := os.Getenv("NVM_DIR")
if len(nvmDir) == 0 {
nvmDir = "$HOME/.nvm"
nvmDir, err := sls.installNvm()
if err != nil {
return err
}

command := fmt.Sprintf(
Expand Down Expand Up @@ -329,9 +329,9 @@ func (sls *Manager) runCreateDomain(w io.Writer) error {
}

func (sls *Manager) runRemoveDomain(w io.Writer) error {
nvmDir := os.Getenv("NVM_DIR")
if len(nvmDir) == 0 {
nvmDir = "$HOME/.nvm"
nvmDir, err := sls.installNvm()
if err != nil {
return err
}

command := fmt.Sprintf(
Expand Down

0 comments on commit 7d1665b

Please sign in to comment.