Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public async run(): Promise {
const logger = await core.Logger.root();
this.ux.log(
`Applying plan file ${
this.flags.definitionfile
} to org ${this.org.getUsername()}`
);
for (const setting of this.settings) {
const driver = setting.Driver.default;
const instance = new driver(this.bf, this.org);
this.ux.startSpinner(`[${driver.name}] retrieving state`);
let state;
try {
state = await instance.retrieve(setting.value);
} catch (err) {
this.ux.stopSpinner('failed');
throw err;
}