Skip to content

Bug: Windows command line not being followed #1

Open

Description

@tyeeman

What were you trying to achieve?

Windows command line -

watchdoc.exe -no-browser true -watch-dirs ./content -serve-dir ./out -cmd "./build.bat"

watchdoc cmd window -

2026/03/29 21:43:03 File server started at port 8080
2026/03/29 21:43:03 Open your browser at http://localhost:8080
2026/03/29 21:43:03 Serving from: G:\laragonServerPortable\www\SiskaNewslettersEdits\luasmith
2026/03/29 21:43:03 Watching for changes in: G:\laragonServerPortable\www\SiskaNewslettersEdits\luasmith

Serving directory should end in "\out"
Watching directory should end in "\content"

What are the expected results?

Serving directory should end in "\out"
Watching directory should end in "\content"

What are the received results?

luasmith is the directory where watchdoc is running from which is not what command line says to do for watch and serve folders.

Steps To Reproduce

Use my command line in Windows

In what environment did you encounter the issue?

Windows 10

Additional information you deem important

No response

Activity

  1. added
    bugSomething isn't working
    help wantedExtra attention is needed
    on Mar 30, 2026
  2. tyeeman commented on Apr 1, 2026

    @tyeeman
    Author

    I tried using full paths but still the same result. I tried using backslashes also but same result.

  3. tyeeman commented on Apr 2, 2026

    @tyeeman
    Author

    OK, i'm getting somewhere. I was using sandboxie and this app was not seeing the browser in it. I removed the no browser switch and now my other browser opens out of the sandbox and it is seen. When I make a change watchdoc wants to use a linux command. Here is the error -

    2026/04/01 19:50:23 Command execution failed: exec: "sh": executable file not found in %PATH%
    

    There is no sh.exe in windows. Watchdoc should be looking for I assume, cmd.exe, Yes?

    Update - I changed the watcher.go line from "sh" to "cmd.exe". It seems it still won't run my build.bat file. It says command executed but I did not see any cmd window open and the browser has not updated -

    2026/04/01 21:06:52 File server started at port 8080
    2026/04/01 21:06:52 Open your browser at http://localhost:8080
    2026/04/01 21:06:52 Command: ./build.bat
    2026/04/01 21:06:52 Watching directories: G:\laragonServerPortable\www\SiskaNewslettersEdits\luasmith\out,./content/posts
    2026/04/01 21:06:52 Serving from: G:\laragonServerPortable\www\SiskaNewslettersEdits\luasmith\out
    2026/04/01 21:06:52 Watching for changes in: G:\laragonServerPortable\www\SiskaNewslettersEdits\luasmith\out
    2026/04/01 21:06:52 Watching for changes in: G:\laragonServerPortable\www\SiskaNewslettersEdits\luasmith\content\posts
    2026/04/01 21:07:17 File changed: G:\laragonServerPortable\www\SiskaNewslettersEdits\luasmith\content\posts\apr-2026.md
    2026/04/01 21:07:17 File changed: G:\laragonServerPortable\www\SiskaNewslettersEdits\luasmith\content\posts\apr-2026.md
    2026/04/01 21:07:17 Executing command: ./build.bat
    Microsoft Windows [Version 10.0.19044.3930]
    (c) Microsoft Corporation. All rights reserved.
    
    G:\laragonServerPortable\www\SiskaNewslettersEdits\luasmith>2026/04/01 21:07:17 Command execution completed
    
  4. dborovcanin commented on Sep 11, 2026

    @dborovcanin
    Contributor

    This should be fixed with the latest release (e518dc0) but I did not have a WIndows machine to test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions