Skip to content
This repository has been archived by the owner on Feb 5, 2022. It is now read-only.

Commit

Permalink
fix: use relative pkg path and escape dots
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Nov 6, 2018
1 parent b1ab201 commit 9a7ede4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/runPrompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ module.exports = async (config, context) => {
? await config.prompts.call(context, context)
: config.prompts

const pkgPath = resolveFrom.silent(context.generator.path, 'package.json')
const pkgPath = resolveFrom.silent(context.generator.path, './package.json')
const pkgVersion = pkgPath ? require(pkgPath).version : ''
const STORED_ANSWERS_ID = `answers.${context.generator.hash +
'__npm__' +
pkgVersion}`
pkgVersion.replace(/\./g, '\\.')}`
const storedAnswers = store.get(STORED_ANSWERS_ID) || {}

const { mock, yes } = context.sao.opts
Expand Down

0 comments on commit 9a7ede4

Please sign in to comment.