Skip to content

Commit

Permalink
change debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode committed Jun 24, 2019
1 parent 890cbb0 commit 299e40e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/runner/bin.ts
@@ -1,8 +1,4 @@
import index from './'
import debug from '../debug'

// Debug
debug(`CWD=${process.env.CWD}`)

// Run hook
index(process.argv)
Expand Down
5 changes: 5 additions & 0 deletions src/runner/index.ts
Expand Up @@ -2,6 +2,7 @@ import execa from 'execa'
import getStdin from 'get-stdin'
import path from 'path'
import readPkg from 'read-pkg'
import debug from '../debug'
import getConf from '../getConf'

export interface Env extends NodeJS.ProcessEnv {
Expand All @@ -18,6 +19,10 @@ export default async function run(
getStdinFn: () => Promise<string> = getStdin
): Promise<number> {
const cwd = path.resolve(scriptPath.split('node_modules')[0])

// Debug
debug(`CWD=${cwd}`)

// In some cases, package.json may not exist
// For example, when switching to gh-page branch
let pkg
Expand Down

0 comments on commit 299e40e

Please sign in to comment.