Skip to content
Snippets Groups Projects
Commit 33bcf2d1 authored by tamaina's avatar tamaina
Browse files

Fix lint

parent 795fb0eb
No related branches found
No related tags found
No related merge requests found
...@@ -18,10 +18,10 @@ export default () => { ...@@ -18,10 +18,10 @@ export default () => {
const args = process.argv.slice(3); const args = process.argv.slice(3);
const name = args[0]; const name = args[0];
const url = args[1]; const url = args[1];
if (!name) throw new Error('require name'); if (!name) throw new Error('require name');
if (!url) throw new Error('require url'); if (!url) throw new Error('require url');
main(name, url).then(() => { main(name, url).then(() => {
console.log('success'); console.log('success');
process.exit(0); process.exit(0);
......
...@@ -7,7 +7,7 @@ async function main(uri: string): Promise<any> { ...@@ -7,7 +7,7 @@ async function main(uri: string): Promise<any> {
export default () => { export default () => {
const args = process.argv.slice(3); const args = process.argv.slice(3);
const uri = args[0]; const uri = args[0];
main(uri).then(result => { main(uri).then(result => {
console.log(`Done: ${result}`); console.log(`Done: ${result}`);
process.exit(0); process.exit(0);
......
...@@ -10,17 +10,17 @@ export default () => { ...@@ -10,17 +10,17 @@ export default () => {
// get args // get args
const args = process.argv.slice(3); const args = process.argv.slice(3);
let acct = args[0]; let acct = args[0];
// normalize args // normalize args
acct = acct.replace(/^@/, ''); acct = acct.replace(/^@/, '');
// check args // check args
if (!acct.match(/^\w+@\w/)) { if (!acct.match(/^\w+@\w/)) {
throw `Invalid acct format. Valid format are user@host`; throw `Invalid acct format. Valid format are user@host`;
} }
console.log(`resync ${acct}`); console.log(`resync ${acct}`);
main(acct).then(() => { main(acct).then(() => {
console.log('Done'); console.log('Done');
process.exit(0); process.exit(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment