Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
fix(grant): fix permissions validation
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Aug 17, 2018
1 parent f2d83fe commit 07f7435
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ cmd.grant = (spec, scope, team, permissions, opts) => {
spec = npa(spec)
validate('OSSSO', [spec, scope, team, permissions, opts])
scope = scope.replace(/^@/, '')
if (permissions !== 'read-write' || permissions !== 'read-only') {
throw new Error('`permissions` must be `read-write` or `read-only`. Got `' + permissions + '`instead')
if (permissions !== 'read-write' && permissions !== 'read-only') {
throw new Error('`permissions` must be `read-write` or `read-only`. Got `' + permissions + '` instead')
}
const uri = `/-/team/${eu(scope)}/${eu(team)}/package`
return npmFetch.json(uri, opts.concat({
Expand Down

0 comments on commit 07f7435

Please sign in to comment.