Skip to content

Commit 06a2e5e

Browse files
authored
Merge pull request #84 from RobotsAndPencils/debug
add debug logging
2 parents f5bb0aa + cc49c4c commit 06a2e5e

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

Diff for: .github/workflows/test.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
npm install
1717
- run: |
1818
npm run all
19-
test: # make sure the action works
19+
test: # make sure the action works without having to build
2020
strategy:
2121
matrix:
2222
runs-on: [macos-latest, ubuntu-20.04, ubuntu-22.04, ubuntu-latest]
@@ -30,10 +30,6 @@ jobs:
3030
- name: Checkout Github
3131
uses: actions/checkout@v3
3232
if: ${{ !env.ACT }}
33-
- name: Install dependencies
34-
run: npm install
35-
- name: Build Typescript
36-
run: npm run all
3733
- name: Test Action
3834
uses: ./
3935
id: secrets

Diff for: dist/index.js

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: src/1password.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ export class OnePassword {
105105

106106
async signOut(): Promise<void> {
107107
const env = this.onePasswordEnv
108-
await execWithOutput('op', ['signout', '--account', 'github_action', '--forget'], {env})
108+
await execWithOutput(
109+
'op',
110+
['signout', '--account', 'github_action', '--forget'],
111+
{env}
112+
)
109113
}
110114
}

Diff for: src/exec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ export async function execWithOutput(
88
let out = ''
99
let err = ''
1010

11+
const isDebug = process.env.ACTIONS_STEP_DEBUG === 'true'
1112
const opt = options ?? {}
12-
opt.silent = true // for debugging set this to false to see the output of 1password
13+
opt.silent = !isDebug
1314
opt.listeners = {
1415
stdout: (data: Buffer) => {
1516
out += data.toString()

0 commit comments

Comments
 (0)