Skip to content

Commit 517293d

Browse files
authored
Merge pull request #73 from legendu-net/dev
Merge dev into main
2 parents bb64cf2 + dbd0806 commit 517293d

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

cmd/dev/git.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func configGitUi(cmd *cobra.Command) {
8686
home := utils.UserHomeDir()
8787
configGitUiHelper(filepath.Join(home, ".config/"))
8888
if utils.IsLinux() {
89-
baseDir := os.Getenv("XDG_CONFIG_HOME")
89+
baseDir := os.Getenv("XDG_CONFIG_HOME")
9090
if baseDir != "" {
9191
configGitUiHelper(filepath.Join(baseDir))
9292
}

cmd/ldc.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ func ldc(cmd *cobra.Command, args []string) {
139139
appendDockerImageCommand(&command, &args)
140140
command_s := strings.Join(command, " ")
141141
log.Printf("Launching Docker container using the following command:\n\n%s\n\n", command_s)
142-
utils.RunCmd(command_s)
142+
if !utils.GetBoolFlag(cmd, "dry-run") {
143+
utils.RunCmd(command_s)
144+
}
143145
}
144146

145147
var ldcCmd = &cobra.Command{
@@ -157,5 +159,6 @@ func init() {
157159
ldcCmd.Flags().StringP("password", "P", "", "The default password for the user (to create in the Docker container).")
158160
ldcCmd.Flags().StringSlice("extra-port-mappings", []string{}, "Extra port mappings.")
159161
ldcCmd.Flags().BoolP("mount-home", "m", false, "Mount /home on the host as /home_host in the Docker container.")
162+
ldcCmd.Flags().Bool("dry-run", false, "Print out the docker command without running it.")
160163
rootCmd.AddCommand(ldcCmd)
161164
}

cmd/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
// Update icon.
1010
func version(cmd *cobra.Command, args []string) {
11-
fmt.Println("0.18.8")
11+
fmt.Println("0.19.0")
1212
}
1313

1414
var versionCmd = &cobra.Command{

0 commit comments

Comments
 (0)