]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tools/upload.ts
Don't get quota twice
[github/Chocobozzz/PeerTube.git] / server / tools / upload.ts
index 4d40c8c1a23824822a549cb38b567e9f9edadae3..796a0f723aeea127f12de3e18ccb91d1b593a2bf 100644 (file)
@@ -1,13 +1,10 @@
 import * as program from 'commander'
-import { access, constants } from 'fs'
+import { access, constants } from 'fs-extra'
 import { isAbsolute } from 'path'
-import { promisify } from 'util'
 import { getClient, login } from '../tests/utils'
 import { uploadVideo } from '../tests/utils/index'
 import { VideoPrivacy } from '../../shared/models/videos'
 
-const accessPromise = promisify(access)
-
 program
   .option('-u, --url <url>', 'Server url')
   .option('-U, --username <username>', 'Username')
@@ -68,7 +65,7 @@ async function run () {
   const res2 = await login(program[ 'url' ], client, user)
   const accessToken = res2.body.access_token
 
-  await accessPromise(program[ 'file' ], constants.F_OK)
+  await access(program[ 'file' ], constants.F_OK)
 
   console.log('Uploading %s video...', program[ 'videoName' ])