mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-15 02:05:54 -07:00
Use fsp for promises
This commit is contained in:
parent
a5714ebf34
commit
e08aa2356d
10 changed files with 27 additions and 26 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { promises as fs } from 'fs';
|
||||
import { promises as fsp } from 'fs';
|
||||
import { CLI } from '../../../../FlowHelpers/1.0.0/cliUtils';
|
||||
import {
|
||||
IpluginDetails,
|
||||
|
|
@ -99,7 +99,7 @@ const plugin = async (args:IpluginInputArgs):Promise<IpluginOutputArgs> => {
|
|||
|
||||
if (presetString.trim() !== '') {
|
||||
const preset = JSON.parse(presetString);
|
||||
await fs.writeFile(presetPath, JSON.stringify(preset, null, 2));
|
||||
await fsp.writeFile(presetPath, JSON.stringify(preset, null, 2));
|
||||
cliArgs.push('--preset-import-file');
|
||||
cliArgs.push(presetPath);
|
||||
cliArgs.push('-Z');
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { promises as fs } from 'fs';
|
||||
import { promises as fsp } from 'fs';
|
||||
import { CLI } from '../../../../FlowHelpers/1.0.0/cliUtils';
|
||||
import {
|
||||
IpluginDetails,
|
||||
|
|
@ -142,7 +142,7 @@ const plugin = async (args: IpluginInputArgs): Promise<IpluginOutputArgs> => {
|
|||
|
||||
if (useJsonPreset) {
|
||||
const preset = JSON.parse(presetString);
|
||||
await fs.writeFile(presetPath, JSON.stringify(preset, null, 2));
|
||||
await fsp.writeFile(presetPath, JSON.stringify(preset, null, 2));
|
||||
cliArgs.push('--preset-import-file');
|
||||
cliArgs.push(presetPath);
|
||||
cliArgs.push('-Z');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue