mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
chore: lint
This commit is contained in:
parent
43edba8cb8
commit
cc889bda4f
48 changed files with 64 additions and 62 deletions
|
|
@ -10,7 +10,7 @@ const wraptile = require('wraptile');
|
|||
const {promisify} = require('es6-promisify');
|
||||
const exec = require('execon');
|
||||
const load = require('load.js');
|
||||
const tryToCatch = require('try-to-catch');
|
||||
const {tryToCatch} = require('try-to-catch');
|
||||
|
||||
const {encode} = require('../../../common/entity');
|
||||
const removeExtension = require('./remove-extension');
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ module.exports = (name) => {
|
|||
};
|
||||
|
||||
function getExtension(name) {
|
||||
if (/\.tar\.gz$/.test(name))
|
||||
if (name.endsWith('.tar.gz'))
|
||||
return '.tar.gz';
|
||||
|
||||
if (/\.tar\.bz2$/.test(name))
|
||||
if (name.endsWith('.tar.bz2'))
|
||||
return '.tar.bz2';
|
||||
|
||||
return getExt(name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue