Ckan: restarting after CKAN upgrade fails if spaces in path to ckan.exe

Created on 1 Jan 2017  路  4Comments  路  Source: ckan/ckan

CKAN's Command line interface's auto-update functionality is broken in a (non-critical) way:
after downloading and installing a new version of CKAN, it doesn't restart properly if it is installed in a location with spaces in the Path.
Restarting CKAN manually works as normal.

Please describe the expected behaviour

CKAN offers to download a new version, and should restart automatically after the update is downloaded and installed.

Please describe the actual behaviour

Update is downloaded succesfully, but CKAN doesn't restart, instead showing an error (see below) in the terminal.

What steps can be taken to reproduce the issue?

1) Install CKAN in a path that has spaces in it:
for me: ~/.local/share/Steam/steamapps/common/Kerbal\ Space\ Program/ckan.exe
Note the escaped spaces in "Kerbal Space Program"
2) Start CKAN (from a terminal) when there is an update available:
mono ~/.local/share/Steam/steamapps/common/Kerbal\ Space\ Program/ckan.exe

3) CKAN provides the "There is a new version of CKAN available" popup, agree to download now.
4) Update is downloaded and unpacked
5) 'old' CKAN exits, but new one doesn't start. In the terminal there is the following error, and a new terminal prompt, indicating the process has terminated
````
Cannot open assembly '/home/install/.local/share/Steam/steamapps/common/Kerbal': No such file or directory.
exception inside UnhandledException handler:

install@corsair:~$ _
````
Note that the assembly that cannot be found is the partial installation path, truncated at the first space.

CKAN Version

both versions before "CKAN v1.22.1-0-g174271a (beta)".
(CKAN offered to auto-update twice this week, both updates had the error; the listed version is the one after update+restart)

Executed on Ubuntu linux 14.04

mono --version Mono JIT compiler version 4.6.2 (Stable 4.6.2.7/08fd525 Mon Nov 21 12:08:40 UTC 2016) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notifications: epoll Architecture: amd64 Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: sgen

cert-bundle is synced
libcurl4-openssl-dev is installed

Suggested fix

The path that CKAN calls to restart itself should have quote-marks around it:
' "{CKAN_PATH}" ' instead of ' {CKAN_PATH} '

Wrong CKAN

Most helpful comment

wrong CKAN, but a great bug report!

All 4 comments

wrong CKAN, but a great bug report!

D'oh! My apologies!
That's what you get for just typing "ckan issues" into google. Seems my filter bubble isn't small enough yet :-)

I see from the label that this happens regularly. Sorry to be an inconvenience for you!

When Googling for CKAN documentation/support, I get more results for Kerbal Space Program than the data hosting platform.

It's unfortunate, and quite rude from the other CKAN to not check before naming the project if you ask me, but other than upping our SEO game I can't think of ways to improve it.

Was this page helpful?
0 / 5 - 0 ratings