Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
doublefint committed Jun 1, 2018
2 parents fb5cde7 + 63e88e4 commit 729af86
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions extension/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ function runFile ( { conn, file, channel, onEnd }) {

const args = [
"-d", conn,
"-f", file
"-f", file,
"-e"
];

const psql = 'psql'
Expand All @@ -30,6 +31,9 @@ function runFile ( { conn, file, channel, onEnd }) {

channel.show( vscode.ViewColumn.Two )
bgtask.stdout.setEncoding('utf8')
var dt = new Date();
var utcDate = dt.toUTCString();
channel.appendLine(`--------- ${utcDate} ---------`)

const toChannel = data => {
const str = data.toString(), lines = str.match( /[^\r\n]+/g )
Expand All @@ -42,7 +46,7 @@ function runFile ( { conn, file, channel, onEnd }) {
onEnd = onEnd ? onEnd : ()=>{}

bgtask.stdout.on( 'end', () => {
channel.appendLine( `${psql} end.` )
channel.appendLine( `${psql} end.\n` )
onEnd()
})

Expand Down

0 comments on commit 729af86

Please sign in to comment.