Skip to content

Commit

Permalink
Implements Nitrokey#13
Browse files Browse the repository at this point in the history
  • Loading branch information
nickray committed Mar 18, 2019
1 parent 306991e commit 06335a4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions solo/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

import click
import json
import os
import sys

import usb.core

Expand All @@ -20,6 +22,16 @@
from . import _patches # noqa (since otherwise "unused")


if all((os.name == "posix", os.geteuid() == 0)):
print("THIS COMMAND SHOULD NOT BE RUN AS ROOT!")
print()
print("Please install udev rules and run `solo` as regular user (without sudo).")
print("We suggest using: https://github.com/solokeys/solo/blob/master/udev/70-solokeys-access.rules")
print()
print("For more information, see: https://docs.solokeys.io/solo/udev/")
sys.exit(1)


@click.group()
def solo_cli():
pass
Expand Down

0 comments on commit 06335a4

Please sign in to comment.