this repo has no description smallweb.run
smallweb
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

remove install command from CLI

pomdtr 7c8f0e0e a7bcf34a

-45
-44
cmd/install.go
··· 1 - package cmd 2 - 3 - import ( 4 - "fmt" 5 - "os" 6 - "path" 7 - 8 - "github.com/spf13/cobra" 9 - ) 10 - 11 - var script = `#!/bin/sh 12 - 13 - exec smallweb --dir=%s run %s -- "$@" 14 - ` 15 - 16 - func NewCmdInstall() *cobra.Command { 17 - cmd := &cobra.Command{ 18 - Use: "install [app]", 19 - Short: "Install an app to your shell", 20 - Args: cobra.ExactArgs(1), 21 - ValidArgsFunction: completeApp, 22 - RunE: func(cmd *cobra.Command, args []string) error { 23 - binDir := path.Join(os.Getenv("HOME"), ".local", "bin") 24 - if err := os.MkdirAll(binDir, 0755); err != nil { 25 - return fmt.Errorf("failed to create bin directory: %w", err) 26 - } 27 - 28 - binPath := path.Join(binDir, fmt.Sprintf("%s.%s", args[0], k.String("domain"))) 29 - if err := os.WriteFile(binPath, []byte(fmt.Sprintf(script, k.String("dir"), args[0])), 0755); err != nil { 30 - return fmt.Errorf("failed to write script: %w", err) 31 - } 32 - 33 - // make script executable 34 - if err := os.Chmod(binPath, 0755); err != nil { 35 - return fmt.Errorf("failed to make script executable: %w", err) 36 - } 37 - 38 - return nil 39 - }, 40 - } 41 - 42 - return cmd 43 - 44 - }
-1
cmd/root.go
··· 157 157 rootCmd.AddCommand(NewCmdFetch()) 158 158 rootCmd.AddCommand(NewCmdCrons()) 159 159 rootCmd.AddCommand(NewCmdInit()) 160 - rootCmd.AddCommand(NewCmdInstall()) 161 160 rootCmd.AddCommand(NewCmdLogs()) 162 161 rootCmd.AddCommand(NewCmdSync()) 163 162 rootCmd.AddCommand(NewCmdSecrets())