From 202721e5612702b7f89c170ebedb93bb765b48eb Mon Sep 17 00:00:00 2001 From: Dani Martin <32535596+danimartin82@users.noreply.github.com> Date: Fri, 17 Dec 2021 13:18:19 +0100 Subject: [PATCH] Fix skeleton file creation --- lib/cmock_generator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cmock_generator.rb b/lib/cmock_generator.rb index 6ed5110..5311c7d 100644 --- a/lib/cmock_generator.rb +++ b/lib/cmock_generator.rb @@ -134,7 +134,7 @@ class CMockGenerator def create_skeleton_source_file(mock_project) filename = "#{@config.mock_path}/#{@subdir + '/' if @subdir}#{mock_project[:module_name]}.c" existing = File.exist?(filename) ? File.read(filename) : '' - @file_writer.append_file(mock_project[:module_name] + '.c', @subdir) do |file, fullname| + @file_writer.create_file(mock_project[:module_name] + '.c', @subdir) do |file, fullname| blank_project = mock_project.clone blank_project[:parsed_stuff] = { :functions => [] } create_source_header_section(file, fullname, blank_project) if existing.empty?