Skip to content

Commit

Permalink
Standard --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ys authored and fivetanley committed Dec 14, 2020
1 parent 0d948c8 commit 0c8234e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions packages/spaces/commands/vpn/update.js
Expand Up @@ -4,17 +4,17 @@ const cli = require('heroku-cli-util')
const co = require('co')
const parsers = require('../../lib/parsers')()

function check(val, message) {
function check (val, message) {
if (!val) throw new Error(`${message}.\nUSAGE: heroku spaces:vpn:update --name office --cidrs 172.16.0.0/16,10.0.0.0/24 --space example-space`)
}

function* run(context, heroku) {
let lib = require('../../lib/vpn-connections')(heroku)
function * run (context, heroku) {
const lib = require('../../lib/vpn-connections')(heroku)

let space = context.flags.space
const space = context.flags.space
check(space, 'Space name required')

let name = context.flags.name || context.args.name
const name = context.flags.name || context.args.name
check(name, 'VPN name required')

let cidrs = context.flags.cidrs
Expand Down
2 changes: 1 addition & 1 deletion packages/spaces/test/commands/vpn/update.js
Expand Up @@ -11,7 +11,7 @@ describe('spaces:vpn:update', function () {
beforeEach(() => cli.mockConsole())

it('updates VPN', function () {
let api = nock('https://api.heroku.com:443')
const api = nock('https://api.heroku.com:443')
.patch('/spaces/my-space/vpn-connections/office', {
routable_cidrs: ['192.168.0.1/16', '192.168.0.2/16']
})
Expand Down

0 comments on commit 0c8234e

Please sign in to comment.