diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-04-03 23:35:14 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-04-03 23:35:14 +0900 |
| commit | eec1af1f52aa217e12e52c7c9d66f0106e66a200 (patch) | |
| tree | c89a99e6d289c411f1457743776a9d097c9e6554 /src/tools/resync-remote-user.ts | |
| parent | APメンションはaudienceじゃなくてtagを参照するなど (#6128) (diff) | |
| download | sharkey-eec1af1f52aa217e12e52c7c9d66f0106e66a200.tar.gz sharkey-eec1af1f52aa217e12e52c7c9d66f0106e66a200.tar.bz2 sharkey-eec1af1f52aa217e12e52c7c9d66f0106e66a200.zip | |
Revert
Diffstat (limited to 'src/tools/resync-remote-user.ts')
| -rw-r--r-- | src/tools/resync-remote-user.ts | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/src/tools/resync-remote-user.ts b/src/tools/resync-remote-user.ts index c30b645725..c9d1ed588c 100644 --- a/src/tools/resync-remote-user.ts +++ b/src/tools/resync-remote-user.ts @@ -6,26 +6,22 @@ async function main(acct: string): Promise<any> { await resolveUser(username, host, {}, true); } -export default () => { - // get args - const args = process.argv.slice(3); - let acct = args[0]; +// get args +const args = process.argv.slice(2); +let acct = args[0]; - // normalize args - acct = acct.replace(/^@/, ''); +// normalize args +acct = acct.replace(/^@/, ''); - // check args - if (!acct.match(/^\w+@\w/)) { - throw `Invalid acct format. Valid format are user@host`; - } +// check args +if (!acct.match(/^\w+@\w/)) { + throw `Invalid acct format. Valid format are user@host`; +} - console.log(`resync ${acct}`); +console.log(`resync ${acct}`); - main(acct).then(() => { - console.log('Done'); - process.exit(0); - }).catch(e => { - console.warn(e); - process.exit(1); - }); -} +main(acct).then(() => { + console.log('Done'); +}).catch(e => { + console.warn(e); +}); |