Skip to content

Commit

Permalink
feat: add autotoken feature to the generateFiles command too
Browse files Browse the repository at this point in the history
  • Loading branch information
doubleface authored and doubleface committed Aug 25, 2022
1 parent a205f85 commit f8f646a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ const handleImportDirCommand = async args => {

const handleGenerateFilesCommand = async args => {
const { path = '/', filesCount = 10, url, token } = args
const ach = new ACH(token, url, ['io.cozy.files'])
const ach = new ACH(token || autotoken(url, ['io.cozy.files']), url, [
'io.cozy.files'
])
await ach.connect()
await ach.createFiles(path, parseInt(filesCount))
}
Expand Down

0 comments on commit f8f646a

Please sign in to comment.