mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-10-31 15:21:46 +09:00
Fix lint
This commit is contained in:
parent
795fb0eb60
commit
33bcf2d1ea
@ -18,10 +18,10 @@ export default () => {
|
||||
const args = process.argv.slice(3);
|
||||
const name = args[0];
|
||||
const url = args[1];
|
||||
|
||||
|
||||
if (!name) throw new Error('require name');
|
||||
if (!url) throw new Error('require url');
|
||||
|
||||
|
||||
main(name, url).then(() => {
|
||||
console.log('success');
|
||||
process.exit(0);
|
||||
|
@ -7,7 +7,7 @@ async function main(uri: string): Promise<any> {
|
||||
export default () => {
|
||||
const args = process.argv.slice(3);
|
||||
const uri = args[0];
|
||||
|
||||
|
||||
main(uri).then(result => {
|
||||
console.log(`Done: ${result}`);
|
||||
process.exit(0);
|
||||
|
@ -10,17 +10,17 @@ export default () => {
|
||||
// get args
|
||||
const args = process.argv.slice(3);
|
||||
let acct = args[0];
|
||||
|
||||
|
||||
// normalize args
|
||||
acct = acct.replace(/^@/, '');
|
||||
|
||||
|
||||
// check args
|
||||
if (!acct.match(/^\w+@\w/)) {
|
||||
throw `Invalid acct format. Valid format are user@host`;
|
||||
}
|
||||
|
||||
|
||||
console.log(`resync ${acct}`);
|
||||
|
||||
|
||||
main(acct).then(() => {
|
||||
console.log('Done');
|
||||
process.exit(0);
|
||||
|
Loading…
Reference in New Issue
Block a user