mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-21 13:20:30 +08:00
feature: supports to open repository directly from commandline on Linux
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user