Skip to content

Commit

Permalink
config-utils does not mutate args, instead uses clone
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba-kubula committed Apr 14, 2015
1 parent ba0438b commit fc9d6ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/config-utils.coffee
@@ -1,11 +1,14 @@
fs = require 'fs'
yaml = require 'js-yaml'
clone = require 'clone'

configUtils = {}

configUtils.save = (args, path) ->
configUtils.save = (argsOrigin, path) ->
path ?= './dredd.yml'

args = clone argsOrigin

args['blueprint'] = args['_'][0]
args['endpoint'] = args['_'][1]

Expand Down

0 comments on commit fc9d6ad

Please sign in to comment.