diff options
| author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-06-28 20:46:53 -0400 |
|---|---|---|
| committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-06-28 20:46:53 -0400 |
| commit | 1cc4e7fdef266bb43679d8e5689f2746532c42ec (patch) | |
| tree | a5f81e73cad1376febf9f118e67b3b398b11d659 | |
| parent | f52765c63c7b69ec3495098e3fc3891bc7b8a4ce (diff) | |
| download | cmd2-git-1cc4e7fdef266bb43679d8e5689f2746532c42ec.tar.gz | |
Attempt at fixing how xclip is checked for on Linux systems
| -rw-r--r-- | .travis.yml | 7 | ||||
| -rwxr-xr-x | cmd2.py | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml index 270fe4f7..66fb91ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,12 @@ language: python + sudo: false # false enables container-based build for fast boot times on Linux + +addons: + apt: + packages: + - xclip + matrix: include: - os: linux @@ -398,11 +398,10 @@ else: # Running on Linux try: with open(os.devnull, 'w') as DEVNULL: - subprocess.check_call('xclip -o -sel clip', shell=True, stdin=subprocess.PIPE, stdout=DEVNULL, - stderr=DEVNULL) + subprocess.check_call(['which', 'xclip'], stdout=DEVNULL, stderr=DEVNULL) can_clip = True except (subprocess.CalledProcessError, OSError, IOError): - pass # something went wrong with xclip and we cannot use it + pass # xclip is not present, so we cannot use it if can_clip: def get_paste_buffer(): """Get the contents of the clipboard for Linux OSes. |
