You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I already have a mani.yaml configured for multiple projects, I would like to write a custom task that will change my current CLI (in my case darwin or linux) to the project path.
projects:
example:
path: .
desc: A mani example
pinto:
path: frontend/pinto
url: https://github.com/alajmo/pinto.git
desc: A vim theme editor
tags: [frontend, node]
tasks:
go-here:
desc: go to project path
target:
cwd: true # what does this do?
cmd: pushd "$(pwd)"
I would like mani run go-here -p pinto to change the current working directory of my shell to ./frontend/pinto
Testing this I always seem to return to working directory from where I executed mani.
One of the reasons driving this is that many multi-project development teams have repo-specific dependencies such as .npmrc, .python-version, .sdkmanrc which only kick in of the current working directory is that of the project.
The text was updated successfully, but these errors were encountered:
alanktwong
changed the title
change to directory to project path
change to directory of project path
Sep 7, 2024
# List of targets [optional]
targets:
default:
# Target all projects
all: false
# Target current working directory project
cwd: false
# Specify projects via project name
projects: []
# Specify projects via project path
paths: []
# Specify projects via project tags
tags: []
cwd means to target the project you are standing in.
if you stand in /pinto it will target pinto, if you stand in root, it will target /example. This is mainly to avoid typing mani run <task> -p <project>.
Also note, pushd is not available in sh, which is the shell selected by default. If you want to change the default shell add shell: bash (or zsh, etc.):
shell: bash
projects:
example:
path: .
desc: A mani example
pinto:
path: frontend/pinto
url: https://github.com/alajmo/pinto.git
desc: A vim theme editor
tags: [frontend, node]
tasks:
go-here:
desc: go to project path
target:
cwd: true # what does this do?
cmd: pushd "$(pwd)"
If you mean you want to change your current shell's directory, that's not really possible it seems.
If I already have a
mani.yaml
configured for multiple projects, I would like to write a custom task that will change my current CLI (in my case darwin or linux) to the project path.I would like
mani run go-here -p pinto
to change the current working directory of my shell to./frontend/pinto
Testing this I always seem to return to working directory from where I executed
mani
.One of the reasons driving this is that many multi-project development teams have repo-specific dependencies such as
.npmrc
,.python-version
,.sdkmanrc
which only kick in of the current working directory is that of the project.The text was updated successfully, but these errors were encountered: