Skip to content

Commit c2820cd

Browse files
authored
Fix frontend commands not loading nvm (#368)
1 parent ac78dfe commit c2820cd

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/_base/harness/config/commands.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,16 @@ command('frontend watch'):
142142
COMPOSE_PROJECT_NAME: = @('namespace')
143143
exec: |
144144
#!bash(workspace:/)|@
145-
passthru docker-compose exec -u build --workdir '@('frontend.path')' console @('frontend.watch')
145+
# Use `bash -i` to load up /home/build/.bashrc, which sets up node version manager (nvm) paths
146+
passthru docker-compose exec -u build --workdir '@('frontend.path')' console bash -i -c '@('frontend.watch')'
146147
147148
command('frontend console'):
148149
env:
149150
COMPOSE_PROJECT_NAME: = @('namespace')
150151
exec: |
151152
#!bash(workspace:/)|@
152-
passthru docker-compose exec -u build console --workdir '@('frontend.path')' bash
153+
# Use `bash -i` to load up /home/build/.bashrc, which sets up node version manager (nvm) paths
154+
passthru docker-compose exec -u build --workdir '@('frontend.path')' console bash -i
153155
154156
command('port <service>'):
155157
env:

src/spryker/harness.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,15 @@ command('frontend yves watch'):
181181
COMPOSE_PROJECT_NAME: = @('namespace')
182182
exec: |
183183
#!bash(workspace:/)|@
184-
passthru docker-compose exec -u build --workdir '@('frontend.path')' console @('frontend.yves.watch')
184+
# Use `bash -i` to load up /home/build/.bashrc, which sets up node version manager (nvm) paths
185+
passthru docker-compose exec -u build --workdir '@('frontend.path')' console bash -i -c '@('frontend.yves.watch')'
185186
command('frontend zed watch'):
186187
env:
187188
COMPOSE_PROJECT_NAME: = @('namespace')
188189
exec: |
189190
#!bash(workspace:/)|@
190-
passthru docker-compose exec -u build --workdir '@('frontend.path')' console @('frontend.zed.watch')
191+
# Use `bash -i` to load up /home/build/.bashrc, which sets up node version manager (nvm) paths
192+
passthru docker-compose exec -u build --workdir '@('frontend.path')' console bash -i -c '@('frontend.zed.watch')'
191193
---
192194
import:
193195
- harness/config/*.yml

0 commit comments

Comments
 (0)