Skip to content

[BUG] Windows-only taskkill command in create_template() breaks Linux/Mac/Docker deployments #475

@Arijit429

Description

@Arijit429

Bug Description

In src/file_manipulator.py, the create_template() method contains a hardcoded Windows-only command:

os.system("taskkill /F /IM ollama.exe >nul 2>&1")

This silently fails on Linux and macOS — which is the target environment for Docker and CAL FIRE production deployments.

Impact

  • Breaks create_template() on any non-Windows system
  • Docker containers run Linux — this command does nothing and logs no error
  • Silent failure makes debugging extremely difficult in production

Steps to Reproduce

  1. Run FireForm on Linux or macOS
  2. Call the /templates/create endpoint
  3. The taskkill command silently fails with no warning

Fix

Wrap the command in a platform check:

import platform
if platform.system() == "Windows":
    os.system("taskkill /F /IM ollama.exe >nul 2>&1")

Additional

All print() statements in this file should also be replaced with
structured logging calls for production consistency.

Working on a PR for this fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions