Skip to content

Commit 29eaa56

Browse files
committedFeb 5, 2022
fix: mutagenWorkingDir support for monorepos
1 parent 5870fbc commit 29eaa56

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed
 

‎bin/cmds/test.js

+7
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,13 @@ exports.builder = (yargs) => (
172172
type: 'boolean',
173173
default: false,
174174
})
175+
.option('mutagen-dir', {
176+
describe: 'custom mutagen dir',
177+
default: process.cwd(),
178+
})
179+
.option('mutagen-working-dir', {
180+
describe: 'custom mutagen working dir',
181+
})
175182
.option('exec-user', {
176183
alias: 'euser',
177184
describe: 'user to run setup commands with',

‎bin/cmds/test_cmds/auto-compose.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ exports.handler = async (argv) => {
5252
mode: 'two-way-resolved',
5353
},
5454
code: {
55-
alpha: process.cwd(),
55+
alpha: argv.mutagenDir,
5656
beta: 'volume://makeomatic-deploy-code',
5757
},
5858
},
@@ -107,11 +107,12 @@ async function tester(compose, argv) {
107107
command: defaultCmd,
108108
}, argv.extras.tester);
109109
const workingDir = testerConfig.working_dir;
110+
const mutagenWorkingDir = (argv.isMutagen && argv.mutagenWorkingDir) || workingDir;
110111
const workingVolume = `\${PWD}:${workingDir}`;
111112
const volumes = testerConfig.volumes.filter((volume) => volume !== workingVolume);
112113

113114
volumes.push(
114-
argv.isMutagen ? `makeomatic-deploy-code:${workingDir}` : workingVolume
115+
argv.isMutagen ? `makeomatic-deploy-code:${mutagenWorkingDir}` : workingVolume
115116
);
116117

117118
if (argv.mirror) {

0 commit comments

Comments
 (0)
Please sign in to comment.