2024-03-01 14:29:01 +03:00
|
|
|
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
|
2023-02-19 16:17:49 +03:00
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
2022-07-04 15:09:00 +03:00
|
|
|
const { run, logError } = require('./index')
|
2022-02-13 19:50:51 +03:00
|
|
|
|
|
|
|
module.exports.run = (args, binName) => {
|
|
|
|
return new Promise((resolve, reject) => {
|
2024-02-03 23:18:34 +03:00
|
|
|
run(args, binName, (error, res) => {
|
|
|
|
if (error) {
|
|
|
|
reject(error)
|
2022-02-13 19:50:51 +03:00
|
|
|
} else {
|
|
|
|
resolve(res)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
2022-07-04 15:09:00 +03:00
|
|
|
|
|
|
|
module.exports.logError = logError
|