Skip to content

Commit 51430ea

Browse files
mspiessMarco Spiess
and
Marco Spiess
authored
fix #146 (#147)
Co-authored-by: Marco Spiess <[email protected]>
1 parent 018eee7 commit 51430ea

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/utils.js

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ module.exports = {
5757
const fromArgs = this.raw[name]
5858
if (typeof fromArgs !== 'undefined') {
5959
value = fromArgs
60+
break
6061
}
6162
}
6263

test/index.js

+9
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,12 @@ test('options propogated to mri', t => {
207207

208208
t.is(config.port, port.toString())
209209
})
210+
211+
test('short form option works with mri default', t => {
212+
const args = setupOptions()
213+
args.option('port', 'The port on which the site will run')
214+
215+
const config = args.parse(argv, { mri: { default: { port: 3000 } } })
216+
217+
t.is(config.port, port)
218+
})

0 commit comments

Comments
 (0)