@@ -7,14 +7,14 @@ var progress = require('progress-stream');
77var bundler = require ( './bundler' ) ;
88
99function devnull ( str ) {
10- return str + ' > /dev/null 2>&1' ;
10+ return ` ${ str } > /dev/null 2>&1` ;
1111}
1212
1313function prepare ( paths ) {
1414 return [
15- devnull ( ' rm -rf ' + paths . old ) ,
16- devnull ( ' mv ' + paths . remote + ' ' + paths . old ) ,
17- devnull ( ' mkdir ' + paths . remote ) ,
15+ devnull ( ` rm -rf ${ paths . old } ` ) ,
16+ devnull ( ` mv ${ paths . remote } ${ paths . old } ` ) ,
17+ devnull ( ` mkdir ${ paths . remote } ` ) ,
1818 devnull ( bundler . untarCmd ( paths . bundle , paths . remote ) ) ,
1919 '\n' // keep this newline so you can simply concat more onto this output
2020 ] . join ( '\n' ) ;
@@ -39,7 +39,7 @@ function runScript(conn, script, out, done) {
3939
4040module . exports = {
4141 deploy : function ( out , projectName , script , connectOptions , scp ) {
42- var prefix = ' Host ' + connectOptions . host + ':' + connectOptions . port + ' -- ' ;
42+ var prefix = ` Host ${ connectOptions . host } : ${ connectOptions . port } -- ` ;
4343 var paths = require ( './remote_paths' ) ( projectName ) ;
4444 return new Promise ( function ( resolve , reject ) {
4545 if ( ! connectOptions . username )
@@ -68,14 +68,14 @@ module.exports = {
6868 }
6969 } ) . on ( 'error' , function ( err ) {
7070 if ( / A u t h e n t i c a t i o n f a i l u r e / . test ( err . message ) ) {
71- reject ( new Error ( prefix + ' Public key is not authorized.\nCheck your key on the Branch tab.' ) ) ;
71+ reject ( new Error ( ` ${ prefix } Public key is not authorized.\nCheck your key on the Branch tab.` ) ) ;
7272 } else
73- reject ( new Error ( prefix + err . name + ': ' + err . message ) ) ;
73+ reject ( new Error ( ` ${ prefix } ${ err . name } : ${ err . message } ` ) ) ;
7474 } ) . on ( 'close' , function ( hadError ) {
7575 if ( hadError )
76- reject ( new Error ( prefix + ' Remote connection had errors.' ) ) ; // should have rejected already
76+ reject ( new Error ( ` ${ prefix } Remote connection had errors.` ) ) ; // should have rejected already
7777 else if ( exitCode !== 0 )
78- reject ( new Error ( prefix + ' Remote script exited non-zero ' + exitCode ) ) ;
78+ reject ( new Error ( ` ${ prefix } Remote script exited non-zero ${ exitCode } ` ) ) ;
7979 else
8080 resolve ( ) ;
8181 } ) . connect ( connectOptions ) ;
0 commit comments