purchase cli fails if no job
bplaster opened this issue · comments
bplaster commented
Expected Behavior
Purchase cli should succeed even without a job
Actual Behavior
Purchase cli fails if job is not true and prints:
ara: error: fatal: Expecting job Id.
(This is because purchase.js
requires that job is an object, and purchase cli passes in an empty but valid object if job is false.
} else if (opts.job && 'object' !== typeof opts.job) {
throw TypeError('Expecting job object.')
}
Steps to Reproduce the Problem
- call
act purchase
with job not set
Specifications
- Version:
- Platform:
- Subsystem:
bplaster commented
Also, purchase.js needs to include const { randomBytes } = require('ara-crypto')