Skip to content

Commit

Permalink
don't copy address with newline
Browse files Browse the repository at this point in the history
  • Loading branch information
xfanwu committed Sep 19, 2019
1 parent 199236f commit c23b9d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion changeIP.js
Expand Up @@ -32,7 +32,7 @@ const changeIP = function () {
execute(`aws ec2 release-address --allocation-id ${allocationId}`, res => { execute(`aws ec2 release-address --allocation-id ${allocationId}`, res => {
console.log(`${allocationId} has been released`) console.log(`${allocationId} has been released`)
if (process.platform === "darwin") { if (process.platform === "darwin") {
execute(`echo "${newIP}" | pbcopy`, res => { execute(`echo -n "${newIP}" | pbcopy`, res => {
console.log(`Copied ${newIP} to pastboard`) console.log(`Copied ${newIP} to pastboard`)
}) })
} }
Expand Down

0 comments on commit c23b9d1

Please sign in to comment.