mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-10-31 13:03:20 -07:00
feature: supports to open repository directly from commandline on Linux
This commit is contained in:
parent
8d6481c694
commit
8d726656dc
3 changed files with 3 additions and 3 deletions
0
build/build.linux.sh
Normal file → Executable file
0
build/build.linux.sh
Normal file → Executable file
|
@ -1,2 +1,2 @@
|
|||
#!/bin/bash
|
||||
exec /opt/sourcegit/sourcegit
|
||||
exec /opt/sourcegit/sourcegit $1
|
||||
|
|
|
@ -35,14 +35,14 @@ namespace SourceGit.ViewModels
|
|||
var commandlines = Environment.GetCommandLineArgs();
|
||||
if (commandlines.Length == 2)
|
||||
{
|
||||
var path = commandlines[1].Replace('\\', '/');
|
||||
var path = commandlines[1];
|
||||
var root = new Commands.QueryRepositoryRootPath(path).Result();
|
||||
if (string.IsNullOrEmpty(root))
|
||||
{
|
||||
Pages[0].Notifications.Add(new Models.Notification
|
||||
{
|
||||
IsError = true,
|
||||
Message = $"Given path: '{commandlines[1]}' is NOT a valid repository!"
|
||||
Message = $"Given path: '{path}' is NOT a valid repository!"
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue